Bump min go version to 1.20 to match k3s and tidy go.mod #503
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [ opened, reopened, labeled, synchronize ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
linter: | |
- golangci-lint | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Nix | |
uses: ./.github/actions/setup-nix | |
- name: Run linter | |
run: nix run .#lint-${{ matrix.linter }} | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
- nix-snapshotter | |
- image-hello | |
- image-redis | |
- image-redisWithShell | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Nix | |
uses: ./.github/actions/setup-nix | |
- name: Build package | |
run: nix build .#${{ matrix.package }} | |
integration-test: | |
strategy: | |
matrix: | |
test: | |
- snapshotter | |
- kubernetes | |
runs-on: nix-snapshotter-runner | |
needs: [lint, build] | |
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Nix | |
uses: ./.github/actions/setup-nix | |
with: | |
enable-kvm: true | |
- name: Build snapshotter | |
run: nix build | |
- name: Run integration tests | |
run: nix run -L .#test-${{ matrix.test }} |