Skip to content

Commit 7aa309b

Browse files
authored
Merge branch 'master' into codegen-use-enum-type
2 parents 038e6d6 + 6045d3e commit 7aa309b

File tree

801 files changed

+92808
-45624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

801 files changed

+92808
-45624
lines changed

.codesandbox/ci.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"sandboxes": [
33
"vanilla",
44
"vanilla-ts",
5-
"github/reduxjs/rtk-github-issues-example",
65
"/examples/query/react/basic",
76
"/examples/query/react/advanced",
8-
"/examples/action-listener/counter"
7+
"/examples/action-listener/counter",
8+
"/examples/publish-ci/cra5"
99
],
10-
"node": "14",
10+
"node": "18",
1111
"buildCommand": "build:packages",
1212
"packages": [
1313
"packages/toolkit",

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
id-token: write
2222
contents: read
2323
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-node@v3
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
2626
with:
27-
node-version: '18.x'
27+
node-version: '20.x'
2828
registry-url: 'https://registry.npmjs.org'
2929
cache: 'yarn'
3030
- run: yarn install --frozen-lockfile
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
name: size
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
permissions:
7+
pull-requests: write
38
jobs:
49
size:
510
runs-on: ubuntu-latest
611
env:
712
CI_JOB_NUMBER: 1
813
steps:
9-
- uses: actions/checkout@v2
10-
- uses: andresz1/size-limit-action@v1
14+
- uses: actions/checkout@v4
15+
- uses: EskiMojo14/size-limit-action@v2
1116
with:
1217
directory: packages/toolkit
1318
github_token: ${{ secrets.GITHUB_TOKEN }}
1419
build_script: build-only
20+
package_manager: yarn
21+
size_margin: non-zero

.github/workflows/test-codegen.yml

Lines changed: 82 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: RTK-Query OpenAPI Codegen Tests
4+
name: RTKQ OpenAPI Codegen
55
defaults:
66
run:
77
working-directory: ./packages/rtk-query-codegen-openapi
@@ -15,31 +15,102 @@ jobs:
1515
outputs:
1616
codegen: ${{ steps.filter.outputs.codegen }}
1717
steps:
18-
- uses: actions/checkout@v2
19-
- uses: dorny/paths-filter@v2
18+
- uses: actions/checkout@v4
19+
- uses: dorny/paths-filter@v3
2020
id: filter
2121
with:
2222
filters: |
2323
codegen:
2424
- 'packages/rtk-query-codegen-openapi/**'
25+
- 'yarn.lock'
26+
- '.github/workflows/test-codegen.yml'
2527
2628
build:
2729
needs: changes
2830
if: ${{ needs.changes.outputs.codegen == 'true' }}
2931

30-
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: ./packages/rtk-query-codegen-openapi
35+
36+
runs-on: ${{ matrix.os }}
37+
38+
name: Build artifact for ${{ matrix.os }} with Node ${{ matrix.node-version }}
3139

3240
strategy:
3341
matrix:
34-
node-version: ['16.x']
42+
node-version: ['20.x']
43+
os: [ubuntu-latest]
3544

3645
steps:
37-
- uses: actions/checkout@v2
38-
- name: Use Node.js ${{ matrix.node-version }}
39-
uses: actions/setup-node@v2
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
49+
- name: Setup Node ${{ matrix.node-version }}
50+
uses: actions/setup-node@v4
4051
with:
41-
node-version: ${{ matrix.node }}
52+
node-version: ${{ matrix.node-version }}
4253
cache: 'yarn'
4354

44-
- run: yarn install
45-
- run: yarn test
55+
- name: Install dependencies
56+
run: yarn install
57+
58+
- name: Pack
59+
run: yarn pack
60+
61+
- name: Upload artifact
62+
uses: actions/upload-artifact@v4
63+
id: artifact-upload-step
64+
with:
65+
name: package
66+
path: ./packages/rtk-query-codegen-openapi/package.tgz
67+
68+
- name: Did we fail?
69+
if: failure()
70+
run: ls -lR
71+
72+
test:
73+
needs: build
74+
defaults:
75+
run:
76+
working-directory: ./packages/rtk-query-codegen-openapi
77+
name: Test final build artifact with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
78+
runs-on: ${{ matrix.os }}
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
node-version: [20.x]
83+
os: [ubuntu-latest]
84+
85+
steps:
86+
- name: Checkout repository
87+
uses: actions/checkout@v4
88+
89+
- name: Setup Node ${{ matrix.node-version }}
90+
uses: actions/setup-node@v4
91+
with:
92+
node-version: ${{ matrix.node-version }}
93+
cache: 'yarn'
94+
95+
- name: Download artifact
96+
id: download-artifact
97+
uses: actions/download-artifact@v4
98+
with:
99+
path: ./packages/rtk-query-codegen-openapi
100+
name: package
101+
102+
- name: Install dependencies
103+
run: yarn install
104+
105+
- name: Install build artifact
106+
run: yarn add ./package.tgz
107+
108+
- name: Remove path alias
109+
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.json
110+
111+
- name: Run tests
112+
run: yarn test
113+
114+
- name: Did we fail?
115+
if: failure()
116+
run: ls -R

0 commit comments

Comments
 (0)