Skip to content

Commit

Permalink
check if all of the integration tests are in the test-integration wor…
Browse files Browse the repository at this point in the history
…kflow
  • Loading branch information
vdovhanych committed Mar 2, 2024
1 parent 6af2480 commit cddce3a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check integration tests workflow

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
files: |
*.nix
go.*
**/*.go
integration_test/
config-example.yaml
- uses: DeterminateSystems/nix-installer-action@main
if: steps.changed-files.outputs.any_changed == 'true'
- uses: DeterminateSystems/magic-nix-cache-action@main
if: steps.changed-files.outputs.any_changed == 'true'

- name: Generate and check integration tests
if: steps.changed-files.outputs.any_changed == 'true'
run: |
nix develop --command bash -c "cd cmd/gh-action-integration-generator/ && go generate"
git diff --exit-code .github/workflows/test-integration.yaml
- name: Show missing tests
if: failure()
run: |
git diff .github/workflows/test-integration.yaml

0 comments on commit cddce3a

Please sign in to comment.