CI #1289
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
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@v4 | |
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 |