Integration #212
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
# Code generated by craft; DO NOT EDIT. | |
name: Integration | |
run-name: Integration | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
push: | |
branches: | |
- main | |
- master | |
- staging | |
- dev | |
- develop | |
- development | |
- next | |
- beta | |
- alpha | |
- v[0-9]+.x | |
- v[0-9]+.[0-9]+.x | |
workflow_dispatch: | |
jobs: | |
run-workflow: | |
name: Run Workflow | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && github.ref_protected != true) }} | |
outputs: | |
skip: ${{ steps.skip.outputs.skip }} | |
steps: | |
- id: skip | |
run: echo "Running workflow" && echo "skip=false" >> $GITHUB_OUTPUT | |
go-vulncheck: | |
name: Go Vulnerability Check | |
runs-on: ubuntu-latest | |
needs: run-workflow | |
steps: | |
- uses: golang/govulncheck-action@v1 | |
with: | |
check-latest: true | |
go-package: ./... | |
go-version-file: go.mod | |
go-lint: | |
name: Go Lint | |
runs-on: ubuntu-latest | |
needs: run-workflow | |
permissions: | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
check-latest: true | |
go-version-file: go.mod | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: mkdir -p reports/ | |
- uses: golangci/golangci-lint-action@v6 | |
with: | |
args: --config .golangci.yml --timeout 240s --fast --sort-results --out-format checkstyle:reports/go-ci-lint.checkstyle.xml,colored-line-number | |
go-test: | |
name: Go Test | |
runs-on: ${{ matrix.os }} | |
needs: run-workflow | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
env: | |
OS: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
check-latest: true | |
go-version-file: go.mod | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: mkdir -p reports/ | |
- run: go test ./... -coverpkg="./..." -covermode="count" -coverprofile="reports/go-coverage.native.out" -timeout=15s | |
- uses: codecov/codecov-action@v4 | |
if: ${{ ! startsWith(github.head_ref, 'dependabot') }} # ignore codecov on dependabot branches | |
with: | |
codecov_yml_path: .codecov.yml | |
disable_search: true | |
env_vars: OS | |
fail_ci_if_error: true | |
file: reports/go-coverage.native.out | |
flags: ${{ matrix.os }} | |
slug: ${{ github.repository }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
workflow-result: | |
name: Workflow Result | |
runs-on: ubuntu-latest | |
if: ${{ needs.run-workflow.outputs.skip == 'false' && ! cancelled() }} | |
needs: | |
- run-workflow | |
- go-vulncheck | |
- go-lint | |
- go-test | |
steps: | |
- run: exit 1 | |
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} |