Repository navigation
55 lines (44 loc) · 1.45 KB
/
Copy pathci.yml
File metadata and controls
55 lines (44 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
concurrency: integration_test
on:
push:
branches: [ master ]
tags: '*'
schedule:
- cron: '0 10 * * *' # Run every day at 10:00 UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 11
cache: 'maven'
- name: Set up 1Password Credentials
run: echo $OP_CREDENTIALS > local-connect/1password-credentials.json
env:
OP_CREDENTIALS: ${{ secrets.OP_CREDENTIALS }}
# First we test with the latest OPConnect Docker images
- name: Set up env file (latest)
run: echo OP_IMAGE_VER=$OP_IMAGE_VER > local-connect/.env
env:
OP_IMAGE_VER: 'latest'
- name: Start OPConnect Server
run: sudo docker compose -f local-connect/docker-compose.yaml up -d
- name: Build with Maven
run: mvn package jacoco:report
env:
OP_ACCESS_TOKEN: ${{ secrets.OP_ACCESS_TOKEN }}
- name: Upload Codecov report
uses: codecov/codecov-action@v7
with:
directory: .
- name: Get OPConnect Server logs
run: sudo docker compose -f local-connect/docker-compose.yaml logs
- name: Stop OPConnect Server
run: sudo docker compose -f local-connect/docker-compose.yaml down
# Then test with older versions
# TODO: use reusable workflows https://docs.github.com/en/actions/using-workflows/reusing-workflows