Skip to content

Commit

Permalink
feat: update existing test workflow and add a new code styles workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
razinj committed Jun 23, 2024
1 parent a35160b commit 1e88eb2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Code Style

on: [push]

jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Dependencies
run: npm ci
- name: Check Formatting
run: npm run format:ci
# TODO: Add linting check
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: 'Tests'
name: Tests

on: push
on: [push]

jobs:
jest-tests:
strategy:
matrix:
node-version: ['18.x', '20.x']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Tests
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"test:ci": "jest --ci --no-cache --silent",
"test:coverage": "jest --collect-coverage",
"lint": "eslint . --ext .js,.ts,.tsx",
"format": "prettier --write ."
"format": "prettier --write .",
"format:ci": "prettier --check ."
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.23.1",
Expand Down

0 comments on commit 1e88eb2

Please sign in to comment.