From aff750756c59f7e62e700de98b096e90e53738b1 Mon Sep 17 00:00:00 2001 From: cuongnd Date: Tue, 6 Feb 2024 13:58:00 +0700 Subject: [PATCH] feat: add test workflow --- .github/workflows/test.yml | 68 ++++++++++++++++++++++++++++++++++++++ package.json | 9 ++++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fdafc85 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/package.json b/package.json index 5912eea..24da357 100644 --- a/package.json +++ b/package.json @@ -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",