diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index b785565..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -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 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 1f6b482..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -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 diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..48ce3f3 --- /dev/null +++ b/.github/workflows/push.yaml @@ -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 ./... + diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index dd96bb3..0000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -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 ./...