[BUZOK-1356] Add report on licenses #2
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: Test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'LICENSE' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'LICENSE' | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: oldstable | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Run 'go mod tidy' and push it" | |
exit 1 | |
fi | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Lint | |
uses: golangci/[email protected] | |
with: | |
version: v1.52 | |
args: --deadline=30m | |
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778 | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Install tools | |
uses: aquaproj/[email protected] | |
with: | |
aqua_version: v1.25.0 | |
- name: Check if CLI references are up-to-date | |
run: | | |
mage docs:generate | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Run 'mage docs:generate' and push it" | |
exit 1 | |
fi | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Run unit tests | |
run: mage test:unit | |
integration: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install tools | |
uses: aquaproj/[email protected] | |
with: | |
aqua_version: v1.25.0 | |
- name: Run integration tests | |
run: mage test:integration | |
module-test: | |
name: Module Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install tools | |
uses: aquaproj/[email protected] | |
with: | |
aqua_version: v1.25.0 | |
- name: Run module integration tests | |
shell: bash | |
run: | | |
mage test:module | |
build-test: | |
name: Build Test | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Show available Docker Buildx platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: v1.16.2 | |
args: release --skip-sign --snapshot --clean --skip-publish --timeout 90m | |
env: | |
GPG_FILE: "nogpg.key" |