Skip to content

Commit

Permalink
TESTING: run integration tests using nix in matrix
Browse files Browse the repository at this point in the history
* use self-hosted linux runner
* bump connection attempts for booster test
* use path filters
* run all integration tests when github setup changes
* omit integration tests on macos-12 runner
  • Loading branch information
jberthold committed Apr 17, 2024
1 parent f31d984 commit 897fbdd
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
- runner: [self-hosted, linux, normal]
os: ubuntu-22.04
nix: x86_64-linux
- runner: macos-12
Expand Down Expand Up @@ -114,6 +114,30 @@ jobs:
name: k-framework
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
kore:
- 'kore/**'
kore_rpc_types:
- 'kore-rpc-types/**'
booster:
- 'booster/**'
- scripts/booster-integration-tests.sh
dev_tools:
- 'dev-tools/**'
project:
- 'stack.yaml*'
- 'cabal.project*'
- 'Makefile'
- '*.mk'
- 'flake.nix'
- 'deps/*'
- '.github/'
kore_tests:
- 'test/**'
- name: Build
run: GC_DONT_GC=1 nix build .#kore-exec .#kore-rpc-booster

Expand All @@ -132,8 +156,25 @@ jobs:
cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}
- name: Test
if: ${{ steps.changes.outputs.booster == 'true' || steps.changes.outputs.kore == 'true' || steps.changes.outputs.project == 'true' }}
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "hpack ./booster && hpack dev-tools && cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct kore-test unit-tests"

- name: Run booster integration tests
# do not run this unless anything has changed in a relevant directory
if: ${{ matrix.runner != "macos-12" && (steps.changes.outputs.booster == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.project == 'true') }}
env:
CONNECTION_ATTEMPTS: 30
run: |
GC_DONT_GC=1 nix develop .#cabal --command bash -c "scripts/booster-integration-tests.sh"
- name: Run kore integration tests
# do not run this unless anything has changed in a relevant directory
if: ${{ matrix.runner != "macos-12" && (steps.changes.outputs.kore == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.kore_tests == 'true' || steps.changes.outputs.project == 'true') }}
run: |
GC_DONT_GC=1 nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . --update-input haskell-backend \
--command bash -c "cd test && make -j2 --output-sync test"
nix-integration:
name: 'Nix / Integration'
needs: formatting
Expand Down

0 comments on commit 897fbdd

Please sign in to comment.