Skip to content

Integration

Integration #47

Workflow file for this run

# Code generated by craft; DO NOT EDIT.
name: Integration
run-name: Integration
on:
pull_request:
push:
branches:
- main
- staging
- develop
- v[0-9]+
- v[0-9]+.[0-9]+
workflow_dispatch:
jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
cache: false
go-version-file: go.mod
token: ${{ secrets.GITHUB_TOKEN }}
- uses: golangci/golangci-lint-action@v4
with:
args: --config .golangci.yml --timeout 240s --fast --sort-results --out-format colored-line-number
go-test:
strategy:
fail-fast: false
matrix:
os:
- on: macos-latest
args: CGO_ENABLED="0"
- on: ubuntu-latest
args: CGO_ENABLED="0"
- on: windows-latest
args: env CGO_ENABLED="0"
runs-on: ${{ matrix.os.on }}
env:
OS: ${{ matrix.os.on }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
token: ${{ secrets.GITHUB_TOKEN }}
- run: ${{ matrix.os.args }} go test ./... -coverpkg="./..." -covermode="count" -coverprofile="coverage.out"
- uses: codecov/codecov-action@v4
if: ${{ ! startsWith(github.ref_name, 'dependabot') }} # ignore codecov on dependabot branches
with:
codecov_yml_path: codecov.yml
disable_search: true
env_vars: OS
fail_ci_if_error: true
file: coverage.out
slug: ${{ github.repository }}
token: ${{ secrets.CODECOV_TOKEN }}
docker-hadolint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
security-events: write
steps:
- uses: actions/checkout@v3
- uses: hadolint/[email protected]
continue-on-error: true # enforce scan upload to codeql
with:
format: sarif
output-file: hadolint-results.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: hadolint-results.sarif
category: docker-hadolint
- id: hadolint
uses: hadolint/[email protected]
with:
format: tty
- uses: actions/github-script@v7
if: ${{ github.event_name == 'pull_request' && failure() }}
with:
script: |
const output = `
#### Hadolint: \`${{ steps.hadolint.outcome }}\`
\`\`\`
${process.env.HADOLINT_RESULTS}
\`\`\`
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
});