-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (36 loc) · 1.75 KB
/
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
name: "Rulewerk Tests"
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
jobs:
unit-tests:
name: "Rulewerk Unit Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- env:
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: echo "name=BRANCH_NAME::${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV
- run: echo "name=PR_NUMBER::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV
- run: nix-shell --pure --run "mvn clean test jacoco:report && mvn coveralls:report -D repoToken=${{ secrets.COVERALLS_TOKEN }} -D serviceBuildUrl=https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks -D branch=$BRANCH_NAME -D pullRequest=$PR_NUMBER"
integration-tests:
name: "Rulewerk Integration Tests"
needs: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- env:
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: echo "name=BRANCH_NAME::${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV
- run: echo "name=PR_NUMBER::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV
- run: nix-shell --pure --run "mvn clean verify -Dit.test=!org.semanticweb.rulewerk.integrationtests.vlogissues.*IT -DfailIfNoTests=false"