build(deps): bump golang.org/x/crypto from 0.22.0 to 0.31.0 #383
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: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build | |
run: nix-shell --run 'go build ./...' | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check formatting | |
run: | | |
nix-shell --run ' | |
if [ "$(goimports -l $(find . -type f -name '*.go' -not -path "./vendor/*") | wc -l)" -gt 0 ]; then | |
exit 1 | |
fi' | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check golint | |
run: nix-shell --run 'golint -set_exit_status hydra' | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Test Go | |
run: nix-shell --run 'go test ./...' | |
terraform: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: nix-shell --run 'make install' | |
- name: Terraform fmt | |
run: nix-shell --run 'terraform fmt -check -recursive ./examples' | |
- name: Terraform init | |
run: | | |
nix-shell --run ' | |
for dir in $(find examples -type d); do | |
echo "initializing dir $dir" | |
terraform -chdir=$dir init | |
done | |
' | |
- name: Terraform validate | |
run: | | |
nix-shell --run ' | |
for dir in $(find examples -type d); do | |
echo "validating dir $dir" | |
terraform -chdir=$dir validate -no-color | |
done | |
' | |
# TODO: needs hydra running | |
# - name: Terraform plan | |
# run: nix-shell --run 'terraform -chdir=./examples plan -no-color' | |
vendor: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check vendor is up-to-date | |
run: | | |
nix-shell --run ' | |
git config core.autocrlf false | |
go mod tidy | |
go mod vendor | |
if ! git diff --ignore-all-space; then | |
echo "unclean" | |
git status || true | |
git diff || true | |
exit 1 | |
fi' | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Enable magic Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Shellcheck ./tools/ | |
working-directory: ./tools | |
run: nix-shell ../shell.nix --run 'shellcheck $(find . -type f -executable)' |