-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.58 KB
/
ci.yaml
File metadata and controls
60 lines (57 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
pull_request:
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
env:
CI: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup
- run: make build-ci
lint_and_format:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup
with:
setup-go: "true"
- name: golangci-lint
uses: golangci/golangci-lint-action@v9.2.0
with:
version: v2.11.3
install-only: true
- run: make lint-ci
- run: make format
- name: Check dirty files
id: check-dirty
run: git diff --no-ext-diff --exit-code
- name: Dirty files message
if: failure() && steps.check-dirty.outcome == 'failure'
run: echo "::error::Uncommitted changes detected. Run 'make format' locally."
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup
with:
setup-go: "true"
- run: make test-ci
subgraphs-check:
name: Check GraphQL schemas
runs-on: ubuntu-latest
env:
COSMO_API_KEY: ${{ secrets.COSMO_API_KEY }}
REVIEWS_SUBGRAPH_NAME: ${{ vars.REVIEWS_SUBGRAPH_NAME }}
PRODUCTS_SUBGRAPH_NAME: ${{ vars.PRODUCTS_SUBGRAPH_NAME }}
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup
- run: make check-subgraphs