2525 runs-on : ubuntu-latest
2626 steps :
2727 - name : Checkout Master
28- uses : actions/checkout@v3
28+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2929 - name : Setup env
3030 uses : the-guild-org/shared-config/setup@main
31- with :
32- nodeVersion : 18
3331 - name : Prettier Check
3432 run : yarn prettier:check
3533 dev-tests-old :
4240 - ' esm'
4341 steps :
4442 - name : Checkout
45- uses : actions/checkout@v3
43+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4644 - name : Setup env
4745 uses : the-guild-org/shared-config/setup@main
48- with :
49- nodeVersion : 18
5046 - name : Build
5147 run : yarn build
5248 env :
@@ -56,48 +52,69 @@ jobs:
5652 yarn run generate:examples:${{matrix.method}}
5753 git diff --exit-code -- dev-test/
5854 dev-tests :
59- name : Examples
55+ name : Examples - Normal
6056 runs-on : ubuntu-latest
6157 steps :
6258 - name : Checkout
63- uses : actions/checkout@v3
59+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6460 - name : Setup env
6561 uses : the-guild-org/shared-config/setup@main
66- with :
67- nodeVersion : 18
68- - uses : actions-rs/toolchain@v1
69- with :
70- toolchain : 1.65.0
71- target : wasm32-wasi
72- override : true
73- - name : Build SWC plugin
74- working-directory : ./packages/presets/swc-plugin
75- run : |
76- npm run build-wasm
7762 - name : Build
7863 run : yarn build
7964 env :
8065 CI : true
8166 - name : Generate and Diff Codegen Artifacts
8267 run : |
83- yarn examples:codegen
68+ EXAMPLE_TYPE=normal yarn examples:codegen
8469 git diff --exit-code -- examples/
8570 - name : Build Examples
8671 run : |
87- yarn examples:build
72+ EXAMPLE_TYPE=normal yarn examples:build
8873 - name : End2End Test Examples
8974 run : |
90- yarn examples:test:end2end
75+ EXAMPLE_TYPE=normal yarn examples:test:end2end
76+
77+ # TODO: Remove all SWC test setup and references as that has been moved to https://github.com/swc-project/plugins/tree/main/contrib/graphql-codegen-client-preset
78+ # dev-tests-swc:
79+ # name: Examples - SWC
80+ # runs-on: ubuntu-latest
81+ # steps:
82+ # - name: Checkout
83+ # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
84+ # - name: Setup env
85+ # uses: the-guild-org/shared-config/setup@main
86+ # - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
87+ # with:
88+ # toolchain: 1.65.0
89+ # target: wasm32-wasi
90+ # override: true
91+ # - name: Build SWC plugin
92+ # working-directory: ./packages/presets/swc-plugin
93+ # run: |
94+ # npm run build-wasm
95+ # - name: Build
96+ # run: yarn build
97+ # env:
98+ # CI: true
99+ # - name: Generate and Diff Codegen Artifacts
100+ # run: |
101+ # EXAMPLE_TYPE=swc yarn examples:codegen
102+ # git diff --exit-code -- examples/
103+ # - name: Build Examples
104+ # run: |
105+ # EXAMPLE_TYPE=swc yarn examples:build
106+ # - name: End2End Test Examples
107+ # run: |
108+ # EXAMPLE_TYPE=swc yarn examples:test:end2end
109+
91110 esm :
92111 name : Testing exports integrity
93112 runs-on : ubuntu-latest
94113 steps :
95114 - name : Checkout
96- uses : actions/checkout@v3
115+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
97116 - name : Setup env
98117 uses : the-guild-org/shared-config/setup@main
99- with :
100- nodeVersion : 18
101118 - name : Build
102119 run : yarn build
103120 env :
@@ -114,15 +131,15 @@ jobs:
114131 strategy :
115132 matrix :
116133 os : [ubuntu-latest] # remove windows to speed up the tests
117- node_version : [16, 18, 20 ]
134+ node_version : [20, 22, 24 ]
118135 graphql_version : [15, 16]
119136 include :
120- - node-version : 14
137+ - node-version : 20
121138 os : windows-latest
122139 graphql_version : 16
123140 steps :
124141 - name : Checkout
125- uses : actions/checkout@v3
142+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
126143 - name : Setup env
127144 uses : the-guild-org/shared-config/setup@main
128145 with :
@@ -131,13 +148,13 @@ jobs:
131148 run : node ./scripts/match-graphql.js ${{matrix.graphql_version}}
132149 - name : Install Dependencies
133150 run : yarn
134- - name : Cache Jest
135- uses : actions/cache@v3
151+ - name : Cache Vitest
152+ uses : actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
136153 with :
137- path : .cache/jest
138- key : ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest -${{hashFiles('yarn.lock')}}
154+ path : node_modules/.vite
155+ key : ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest -${{hashFiles('yarn.lock')}}
139156 restore-keys : |
140- ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest -
157+ ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest -
141158 - name : Build
142159 run : yarn build
143160 - name : Test
@@ -148,8 +165,8 @@ jobs:
148165 name : Build and Unit Test SWC Plugin
149166 runs-on : ubuntu-latest
150167 steps :
151- - uses : actions/checkout@v3
152- - uses : actions-rs/toolchain@v1
168+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
169+ - uses : actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
153170 with :
154171 toolchain : 1.65.0
155172 target : wasm32-wasi
0 commit comments