Skip to content

Commit d0cb543

Browse files
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
1 parent 64bae79 commit d0cb543

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

.circleci/config.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@ jobs:
6565
at: ~/react-native-testing-library
6666
- run: |
6767
cd website && yarn install && yarn build
68-
test-examples:
69-
<<: *defaults
70-
steps:
71-
- attach_workspace:
72-
at: ~/react-native-testing-library
73-
- run: |
74-
ls -d ./examples/* | xargs -I {} bash -c "cd '{}' && yarn install && yarn test"
7568
deploy-website:
7669
<<: *defaults
7770
steps:
@@ -103,10 +96,6 @@ workflows:
10396
- install-dependencies
10497
# docusuarus build is running when deploying website as well
10598
filters: *filter-ignore-main
106-
- test-examples:
107-
requires:
108-
- install-dependencies
109-
filters: *filter-only-main
11099
- deploy-website:
111100
requires:
112101
- install-dependencies

.github/workflows/example-apps.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test Example Apps
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
test-example:
7+
strategy:
8+
matrix:
9+
node: [14, 16, 18]
10+
example: [basic, redux, reactnavigation]
11+
name: Test Example
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node }}
22+
cache: 'yarn'
23+
24+
- name: Install and build
25+
run: cd examples/${{ matrix.example }} && yarn install && yarn test

0 commit comments

Comments
 (0)