Skip to content

Commit e1434f7

Browse files
committed
Build Next RSC example in CI
1 parent 2730991 commit e1434f7

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

Diff for: .github/workflows/test.yml

+57
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ jobs:
3131
- name: Collect coverage
3232
run: yarn coverage
3333

34+
- name: Build
35+
run: yarn build
36+
37+
- name: Pack
38+
run: yarn pack
39+
40+
- uses: actions/upload-artifact@v2
41+
with:
42+
name: package
43+
path: ./package.tgz
44+
3445
test-types:
3546
name: Test Types with TypeScript ${{ matrix.ts }}
3647

@@ -61,3 +72,49 @@ jobs:
6172
run: |
6273
yarn tsc --version
6374
yarn type-tests
75+
76+
test-published-artifact-local:
77+
name: Test Published Artifact (Local) ${{ matrix.example }}
78+
79+
needs: [build]
80+
runs-on: ubuntu-latest
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
node: ['16.x']
85+
example: ['rr-rsc-context']
86+
defaults:
87+
run:
88+
working-directory: ./examples/publish-ci/${{ matrix.example }}
89+
steps:
90+
- name: Checkout repo
91+
uses: actions/checkout@v2
92+
93+
- name: Use node ${{ matrix.node }}
94+
uses: actions/setup-node@v2
95+
with:
96+
node-version: ${{ matrix.node }}
97+
cache: 'yarn'
98+
99+
- name: Install deps
100+
run: yarn install
101+
102+
- name: Remove existing React-Redux
103+
run: yarn remove react-redux
104+
105+
- uses: actions/download-artifact@v2
106+
with:
107+
name: package
108+
path: ./examples/publish-ci/${{ matrix.example }}
109+
110+
- name: Check folder contents
111+
run: ls -l .
112+
113+
- name: Install build artifact
114+
run: yarn add ./package.tgz
115+
116+
- name: Show installed React-Redux versions
117+
run: yarn info react-redux && yarn why react-redux
118+
119+
- name: Build example
120+
run: yarn build

0 commit comments

Comments
 (0)