mirror of
https://github.com/GabrielVidal1/ask-form.git
synced 2026-12-04 18:17:27 +01:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version: "1.24"
|
|
cache: false # stdlib only: no go.sum to key a cache on
|
|
- name: gofmt
|
|
run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; }
|
|
- run: go vet ./...
|
|
- run: go test -race ./...
|
|
- name: Install script
|
|
run: sh -n install.sh
|
|
|
|
build:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0 # git describe for the version
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version: "1.24"
|
|
cache: false # stdlib only: no go.sum to key a cache on
|
|
- name: Build every platform
|
|
run: make dist
|
|
- name: Smoke test
|
|
run: ./dist/ask-form-linux-amd64 version && ./dist/ask-form-relay-linux-amd64 version
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ask-form-${{ github.sha }}
|
|
path: dist/
|
|
retention-days: 14
|