Skip to content

Commit 026b5f0

Browse files
committed
Migrated eslint and test to github action
1 parent 5a90463 commit 026b5f0

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/eslint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run ESLint and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
run-eslint-and-test:
14+
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '22'
27+
cache: 'yarn'
28+
29+
- name: Cache node_modules
30+
uses: actions/cache@v4
31+
with:
32+
path: node_modules
33+
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
36+
37+
- name: Install dependencies
38+
run: yarn install --frozen-lockfile
39+
40+
- name: Run ESLint
41+
run: yarn lint
42+
43+
- name: Run Tests
44+
run: yarn test --runInBand

0 commit comments

Comments
 (0)