Skip to content

Commit

Permalink
Add GitHub actions jobs which runs golden-diff for each test case
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Jul 25, 2024
1 parent 4611553 commit 2c041bd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,22 @@ jobs:
pattern: |
*.sh
step-*
test_gitlab_generator_script_define_cases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Find test cases
run: |
make -sC gitlab list_test_instances >> "$GITHUB_OUTPUT"
test_gitlab_generator_script:
needs: tests_gitlab_generator_script_define_cases
strategy:
matrix:
instance: ${{ fromJSON(needs.test_gitlab_generator_script_define_cases.outputs.instances) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
make -C gitlab golden-diff -e instance=${{ matrix.instance }}
5 changes: 5 additions & 0 deletions gitlab/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ gen-golden-all: $(test_instances)
.PHONY: $(test_instances)
$(test_instances):
$(MAKE) $(recursive_target) -e instance=$(basename $(@F))

.PHONY: list_test_instances
list_test_instances: JSONNET_ENTRYPOINT=jsonnet
list_test_instances:
$(JSONNET_DOCKER) --ext-str instances="$(test_instances)" -e 'std.split(std.extVar("instances"), " ")'

0 comments on commit 2c041bd

Please sign in to comment.