-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
112 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: pr-build | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
compile-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: install | ||
run: yarn run dependencies | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: cache build | ||
id: cache-build | ||
uses: actions/cache@v3 | ||
with: | ||
key: cache-build-${{ github.sha }} | ||
path: | | ||
icon | ||
hooks | ||
es | ||
dist | ||
lib | ||
- name: yarn build | ||
if: steps.cache-es.outputs.cache-hit != 'true' | ||
run: yarn icon && yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: pr-test | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
prepare-build: | ||
uses: ./.github/workflows/pr-build.yml | ||
|
||
test-client: | ||
needs: ['prepare-build'] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
reactVersion: [16, 17, 18] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: install | ||
run: yarn run dependencies | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: restore build | ||
uses: actions/cache@v3 | ||
with: | ||
key: cache-build-${{ github.sha }} | ||
path: ./ | ||
|
||
- name: install react ${{ matrix.reactVersion }} | ||
run: yarn add react@${{matrix.reactVersion}} react-dom@${{matrix.reactVersion}} | ||
|
||
- name: test:client ${{ matrix.reactVersion }} | ||
run: yarn test:client | ||
|
||
test-node: | ||
needs: ['prepare-build'] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
reactVersion: [16, 17, 18] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
|
||
- name: install | ||
run: yarn run dependencies | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: restore build | ||
uses: actions/cache@v3 | ||
with: | ||
key: cache-build-${{ github.sha }} | ||
path: ./ | ||
|
||
- name: install react ${{ matrix.reactVersion }} | ||
run: yarn add react@${{matrix.reactVersion}} react-dom@${{matrix.reactVersion}} | ||
|
||
- name: test:node ${{ matrix.reactVersion }} | ||
run: yarn test:node |
This file was deleted.
Oops, something went wrong.