Adds DownloadCorazaConfig, CI changes check #31
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: Regression Tests | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
- "LICENSE" | |
pull_request: | |
paths-ignore: | |
- "**/*.md" | |
- "LICENSE" | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.20.x, 1.21.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Tests | |
run: go run mage.go test | |
check_changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.x | |
- name: Download CRS and Coraza config | |
run: go run mage.go downloadDeps | |
- name: Check if there are changes | |
id: changes | |
uses: UnicornGlobal/[email protected] | |
- name: Process changes | |
if: steps.changes.outputs.changed == 1 | |
run: | | |
echo 'Uncommited changes detected. Run `go run mage.go downloadDeps` to check the changes and commit them.' | |
exit 1 |