Merge workflows

This commit is contained in:
Vilsol 2022-04-14 04:35:11 +03:00
parent bcfc88da55
commit 92ef2080d0
4 changed files with 67 additions and 80 deletions

View file

@ -1,27 +0,0 @@
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.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download GQL schema
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
- name: Go Generate
run: go generate -tags tools -x ./...
- name: Build
run: go build -v -o ficsit-cli .
env:
CGO_ENABLED: 1

View file

@ -1,28 +0,0 @@
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.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download GQL schema
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
- name: Go Generate
run: go generate -tags tools -x ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
skip-pkg-cache: true
skip-build-cache: true

67
.github/workflows/push.yaml vendored Normal file
View file

@ -0,0 +1,67 @@
name: push
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.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download GQL schema
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
- name: Go Generate
run: go generate -tags tools -x ./...
- name: Build
run: go build -v -o ficsit-cli .
env:
CGO_ENABLED: 1
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
skip-pkg-cache: true
skip-build-cache: true
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download GQL schema
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
- name: Go Generate
run: go generate -tags tools -x ./...
- name: Test
run: go test ./...

View file

@ -1,25 +0,0 @@
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.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download GQL schema
run: "npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql"
- name: Go Generate
run: go generate -tags tools -x ./...
- name: Test
run: go test ./...