Skip to content

Commit 4c4c145

Browse files
GitHub Actions test workflow (#257)
* chore: fix `yarn test` * chore: GitHub Actions workflow to run `yarn test`
1 parent 0cc5ad5 commit 4c4c145

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
name: Test
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js and Yarn
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18'
21+
22+
- uses: actions/cache@v3
23+
id: cache
24+
with:
25+
path: '**/node_modules'
26+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
27+
28+
- name: Install dependencies
29+
if: steps.cache.outputs.cache-hit != 'true'
30+
run: yarn install --frozen-lockfile && yarn --cwd test install --frozen-lockfile
31+
32+
- name: Test
33+
run: yarn test

test/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ export function Hook() {
5757
<>
5858
{/* eslint-disable-next-line react-native/no-inline-styles, react-native/no-color-literals */}
5959
<View style={{ color: 'blue' }}>
60-
{/* eslint-disable-next-line react-native-a11y/has-accessibility-hint */}
61-
<View accessibilityLabel={'xd'}>
62-
{/* eslint-disable-line react-native/no-raw-text */}
63-
raw text with no accessibility hint on a view
64-
</View>
60+
{/* eslint-disable-line react-native/no-raw-text */}
61+
raw text with no accessibility hint on a view
6562
</View>
6663
<Bool />
6764
</>

test/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ export function Hook() {
5757
<>
5858
{/* eslint-disable-next-line react-native/no-inline-styles, react-native/no-color-literals */}
5959
<View style={{ color: 'blue' }}>
60-
{/* eslint-disable-next-line react-native-a11y/has-accessibility-hint */}
61-
<View accessibilityLabel={'xd'}>
62-
{/* eslint-disable-line react-native/no-raw-text */}
63-
raw text with no accessibility hint on a view
64-
</View>
60+
{/* eslint-disable-line react-native/no-raw-text */}
61+
raw text with no accessibility hint on a view
6562
</View>
6663
<Bool />
6764
</>

0 commit comments

Comments
 (0)