Skip to content

Commit

Permalink
feat: add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongnd-ahiho committed Feb 6, 2024
1 parent 8a55a6d commit aff7507
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: ✨ Test

on:
push:
branches:
- "**"
- "!main"

jobs:
test-node20:
name: Run tests using node 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Test
run: yarn ci:install && yarn ci:test
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT }}

test-node18:
name: Run tests using node 18
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18

- name: Test
run: yarn ci:install && yarn ci:test
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT }}

test-node16:
name: Run tests using node 16
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 16

- name: Test
run: yarn ci:install && yarn ci:test
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT }}

test-node14:
name: Run tests using node 14
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 14

- name: Test
run: yarn ci:install && yarn ci:test
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT }}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@
"eslintConfig": {
"extends": [
"@ahiho/eslint-config"
]
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off"
}
},
"dependencies": {},
"devDependencies": {
"@ahiho/commitlint-config": "^1.10.1",
"@ahiho/eslint-config": "^1.16.0",
"@ahiho/prettier-config": "^1.16.1",
"@ahiho/tsconfig": "^1.10.1",
"@nx/js": "18.0.1",
"@nx/workspace": "18.0.1",
"@semantic-release/changelog": "^6.0.3",
Expand Down

0 comments on commit aff7507

Please sign in to comment.