2021-12-02 04:00:33 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.17
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-12-02 04:15:21 +00:00
|
|
|
- name: Download GQL schema
|
2021-12-02 04:16:09 +00:00
|
|
|
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
|
2021-12-02 04:15:21 +00:00
|
|
|
|
2021-12-02 04:00:33 +00:00
|
|
|
- name: Go Generate
|
|
|
|
run: go generate -tags tools -x ./...
|
|
|
|
|
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
2021-12-03 22:35:13 +00:00
|
|
|
with:
|
|
|
|
skip-pkg-cache: true
|
|
|
|
skip-build-cache: true
|
2021-12-02 04:00:33 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v -o ficsit-cli .
|
|
|
|
env:
|
|
|
|
CGO_ENABLED: 1
|