mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
chore: disable test examples workflow on main merge, add GH action for test examples (#1058)
* chore: disable test examples on main * chore: github actions with manual trigger to test examples * chore: run on multiple node versions * chore: trigger initial workflow run * chore: restore manual workflow trigger * chore: refactor to matrix * chore: trigger run * chore: return to workflow_dispatch
This commit is contained in:
committed by
GitHub
parent
64bae79d39
commit
d0cb5439a2
@@ -65,13 +65,6 @@ jobs:
|
||||
at: ~/react-native-testing-library
|
||||
- run: |
|
||||
cd website && yarn install && yarn build
|
||||
test-examples:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/react-native-testing-library
|
||||
- run: |
|
||||
ls -d ./examples/* | xargs -I {} bash -c "cd '{}' && yarn install && yarn test"
|
||||
deploy-website:
|
||||
<<: *defaults
|
||||
steps:
|
||||
@@ -103,10 +96,6 @@ workflows:
|
||||
- install-dependencies
|
||||
# docusuarus build is running when deploying website as well
|
||||
filters: *filter-ignore-main
|
||||
- test-examples:
|
||||
requires:
|
||||
- install-dependencies
|
||||
filters: *filter-only-main
|
||||
- deploy-website:
|
||||
requires:
|
||||
- install-dependencies
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Test Example Apps
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
test-example:
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
example: [basic, redux, reactnavigation]
|
||||
name: Test Example
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install and build
|
||||
run: cd examples/${{ matrix.example }} && yarn install && yarn test
|
||||
Reference in New Issue
Block a user