Nightly Coraza Check #335
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: Nightly Coraza Check | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/nightly-coraza-check.yaml" | |
- ".github/workflows/ci.yaml" | |
schedule: | |
- cron: "0 4 * * *" | |
env: | |
GO_VERSION: "1.22" | |
TINYGO_VERSION: "0.33.0" | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: true | |
- name: Install tinygo | |
uses: acifani/setup-tinygo@v1 | |
with: | |
tinygo-version: ${{ env.TINYGO_VERSION }} | |
- name: Get last commit of coraza | |
id: coraza-latest-commit | |
run: echo "value=$(gh api repos/corazawaf/coraza/commits/main -q .sha)" >> $GITHUB_OUTPUT | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch last coraza version | |
run: go get -u github.com/corazawaf/coraza/v3@${{ steps.coraza-latest-commit.outputs.value }} && go mod tidy | |
- name: Build binary | |
run: go run mage.go build | |
- name: Run tests | |
run: go run mage.go test | |
- name: Run e2e tests | |
run: go run mage.go e2e | |
- name: Run FTW tests | |
run: go run mage.go ftw |