Skip to content

Commit 97e7b55

Browse files
authored
ci: use shared actions (#1142)
* ci: use shared actions * try again * fix
1 parent c221700 commit 97e7b55

File tree

2 files changed

+13
-47
lines changed

2 files changed

+13
-47
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,12 @@ on:
88

99
jobs:
1010
lint:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout Master
14-
uses: actions/checkout@v3
15-
with:
16-
fetch-depth: 0
17-
18-
- name: Use Node
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: 18
22-
23-
- name: Cache Yarn
24-
uses: actions/cache@v3
25-
with:
26-
path: '**/node_modules'
27-
key: ${{runner.os}}-16-16-node-modules-${{hashFiles('yarn.lock')}}
28-
restore-keys: |
29-
${{runner.os}}-16-16-node-modules-
30-
31-
- name: Install Dependencies
32-
run: yarn
33-
34-
- name: Lint
35-
run: yarn lint
11+
name: Lint
12+
uses: the-guild-org/shared-config/.github/workflows/lint.yml@main
13+
with:
14+
script: yarn ci:lint
15+
secrets:
16+
githubToken: ${{ secrets.GITHUB_TOKEN }}
3617

3718
typecheck:
3819
name: typecheck / graphql v${{matrix.graphql_version}}
@@ -47,18 +28,10 @@ jobs:
4728
with:
4829
fetch-depth: 0
4930

50-
- name: Use Node
51-
uses: actions/setup-node@v3
52-
with:
53-
node-version: 18
54-
55-
- name: Cache Yarn
56-
uses: actions/cache@v3
31+
- name: Setup env
32+
uses: the-guild-org/shared-config/setup@main
5733
with:
58-
path: '**/node_modules'
59-
key: ${{runner.os}}-16-${{matrix.graphql_version}}-node-modules-${{hashFiles('yarn.lock')}}
60-
restore-keys: |
61-
${{runner.os}}-16-${{matrix.graphql_version}}-node-modules-
34+
nodeVersion: 18
6235

6336
- name: Use GraphQL v${{matrix.graphql_version}}
6437
run: node ./scripts/match-graphql.mjs ${{matrix.graphql_version}}
@@ -91,18 +64,10 @@ jobs:
9164
with:
9265
fetch-depth: 0
9366

94-
- name: Use Node ${{matrix.node_version}}
95-
uses: actions/setup-node@v3
96-
with:
97-
node-version: ${{matrix.node_version}}
98-
99-
- name: Cache Yarn
100-
uses: actions/cache@v3
67+
- name: Setup env
68+
uses: the-guild-org/shared-config/setup@main
10169
with:
102-
path: '**/node_modules'
103-
key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-node-modules-${{hashFiles('yarn.lock')}}
104-
restore-keys: |
105-
${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-node-modules-
70+
nodeVersion: ${{matrix.node-version}}
10671

10772
- name: Use GraphQL v${{matrix.graphql_version}}
10873
run: node scripts/match-graphql.mjs ${{matrix.graphql_version}}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"generate:docs": "ts-node scripts/generate-docs.ts",
1313
"postinstall": "patch-package",
1414
"lint": "eslint --ignore-path .gitignore --ext ts,js .",
15+
"ci:lint": "eslint --ignore-path .gitignore --ext ts,js . --output-file eslint_report.json --format json",
1516
"prebuild": "rimraf packages/*/dist ./tsconfig.tsbuildinfo",
1617
"transpile-ts": "tsc --project tsconfig.json",
1718
"build": "yarn transpile-ts && bob build",

0 commit comments

Comments
 (0)