2022-11-03 17:48:27 +01:00
|
|
|
name: Integration Test v2 - kradalby
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
integration-test-v2-kradalby:
|
|
|
|
runs-on: [self-hosted, linux, x64, nixos, docker]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
2022-11-04 10:32:57 +01:00
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
2022-11-04 10:40:39 +01:00
|
|
|
uses: tj-actions/changed-files@v34
|
2022-11-04 10:32:57 +01:00
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
*.nix
|
|
|
|
go.*
|
|
|
|
**/*.go
|
|
|
|
integration_test/
|
|
|
|
config-example.yaml
|
2022-11-03 17:48:27 +01:00
|
|
|
|
2022-12-06 08:39:24 +01:00
|
|
|
# We currently only run one job at the time, so make sure
|
|
|
|
# we just wipe all containers and all networks.
|
|
|
|
- name: Clean up Docker
|
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
run: |
|
2022-12-14 08:12:19 +01:00
|
|
|
docker kill $(docker ps -q) || true
|
|
|
|
docker network prune -f || true
|
2022-12-06 08:39:24 +01:00
|
|
|
|
2022-11-03 17:48:27 +01:00
|
|
|
- name: Run general integration tests
|
2022-11-04 10:32:57 +01:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2022-11-03 17:48:27 +01:00
|
|
|
run: nix develop --command -- make test_integration_v2_general
|