For some reason, the MAC address reported by dnsmasq in Docker on GitHub Actions no longer matches the address expected by the test. With Nix, it works.
50 lines
938 B
YAML
50 lines
938 B
YAML
name: GitHub Actions CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- name: Ensure all files were formatted as per gofmt
|
|
run: |
|
|
[ "$(gofmt -l $(find . -name '*.go') 2>&1)" = "" ]
|
|
|
|
- name: Go Vet
|
|
run: |
|
|
go vet
|
|
|
|
- name: Build and Test
|
|
run: |
|
|
go build -v ./cmd/...
|
|
go test -v -race ./internal/...
|
|
|
|
integrationtest:
|
|
name: integrationtest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-25.05
|
|
|
|
- name: Run tests in nix-shell
|
|
run: nix-shell --command 'make test'
|