-
Notifications
You must be signed in to change notification settings - Fork 828
38 lines (36 loc) · 1.13 KB
/
unit-tests.yml
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
name: JUnit tests on database
on:
pull_request:
branches: [ develop ]
permissions:
pull-requests: read
jobs:
container-test-job:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
database: [ 'postgresql-11', 'postgresql-15', 'postgresql-16', 'mysql', 'mysql-8' ]
container:
image: cfidentity/uaa-${{ matrix.database }}
volumes:
- ${{ github.workspace }}:/root/uaa
options: --privileged --tty --interactive --shm-size=1G
steps:
- name: Set env
run: echo "DB=$(echo ${{ matrix.database }} | sed 's/[-0-9]//g')" >> $GITHUB_ENV
- name: Check out repository code
uses: actions/checkout@v4
- name: JUnit tests on container
id: testrun
run: /root/uaa/scripts/unit-tests.sh $DB,default
continue-on-error: true
- name: Test result upload
uses: actions/upload-artifact@v4
if: steps.testrun.outcome == 'failure'
with:
name: Server test
path: /root/uaa/*/build/reports/tests/test/
- name: Check error Result
run: exit 1
if: steps.testrun.outcome == 'failure'