New tests #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-Test-Recipes | |
on: | |
pull_request: | |
paths: | |
- "src/**" | |
- '!src/site/**' | |
jobs: | |
gen-matrix: | |
name: generate-matrix | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Calculate file differences | |
id: diff | |
uses: tj-actions/changed-files@v43 | |
with: | |
json: true | |
dir_names: true | |
dir_names_exclude_current_dir: true | |
- name: List all changed files | |
run: echo '${{ steps.diff.outputs.all_changed_files }}' | |
- name: Generate testing matrix for modified recipes | |
uses: actions/github-script@v6 | |
id: generator | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
console.log(${{ steps.diff.outputs.all_changed_files }}); | |
const script = require('.github/scripts/gen-test-metrics.js') | |
return script( | |
${{ steps.diff.outputs.all_changed_files }} | |
); | |
outputs: | |
matrix: ${{ steps.generator.outputs.result }} | |
matrix-job: | |
name: Run matrix build/test job | |
runs-on: ubuntu-latest | |
needs: gen-matrix | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
file: ${{ fromJson(needs.gen-matrix.outputs.matrix) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test | |
run: | | |
echo ${{ matrix.file }} | |
# start the compose file from the matrix folder | |
# run the go test from the matrix folder |