wispem-wantex fef3f11342
Some checks failed
CI / build-docker (push) Successful in 10s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Failing after 31s
Run the code generator integration test in CI
2025-11-09 16:44:59 -08:00

90 lines
2.3 KiB
YAML

name: CI
on: [push]
jobs:
# These steps build the `gas/ci` docker image.
# There's a tricky bootstrapping problem here. We'll try to cheat first, and if that doesn't
# work, then we'll do a full bootstrapping build starting from Alpine and installing `gocheckout`
# first thing.
build-docker:
continue-on-error: true
container:
image: gas/ci
volumes:
- woodpecker-gocache:/go-cache-volume
env:
GOPATH: /go-cache-volume
GOCACHE: /go-cache-volume/build-cache
steps:
- name: checkout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gocheckout
- name: build CI container
run: docker build -t gas/ci ops/devcontainer
# Fallback: full bootstrap build. This one is quite slow.
build-docker-bootstrap:
needs: build-docker
if: failure()
container:
image: alpine:3.22
volumes:
- woodpecker-gocache:/go-cache-volume
env:
GOPATH: /go-cache-volume
GOCACHE: /go-cache-volume/build-cache
steps:
- name: checkout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
env
apk add go
GOBIN=/usr/local/bin go install git.offline-twitter.com/offline-labs/gocheckout@v0.0.2
gocheckout
- name: install docker
run: apk add docker
- name: build CI container
run: docker build -t gas/ci ops/devcontainer
release-test:
needs: build-docker-bootstrap
if: "!failure()"
container:
image: gas/ci
volumes:
- woodpecker-gocache:/go-cache-volume
env:
GOPATH: /go-cache-volume
GOCACHE: /go-cache-volume/build-cache
GOLANGCI_LINT_CACHE: /go-cache-volume/golangci-lint
steps:
- name: checkout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
env
ls -la /usr/local/bin
gocheckout
- name: test
run: go test ./...
- name: lint
run: golangci-lint run
- name: lint shell
run: find ops/ -name "*.sh" | xargs shellcheck
- name: Run sqlite_lint integration test
run: ops/sqlite_lint_test.sh
- name: Run 'gas init' and 'gas generate'
run: ops/gas_init_test.sh