Skip to content

Commit

Permalink
ci: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
homj committed Nov 20, 2023
1 parent ec4b62a commit bff8da2
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,29 @@ jobs:
path: node_modules
key: cache-node-modules-${{ hashFiles('package-lock.json') }}

- run: npx nx lint
- run: npx nx affected --target=lint --parallel=3 --base=origin/develop

test:
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --no-tags --prune --depth=1 origin develop
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('package-lock.json') }}

- run: npx nx affected --target=test --parallel=3 --configuration=ci --base=origin/develop --codeCoverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ubuntu-latest
Expand All @@ -61,7 +83,8 @@ jobs:
path: node_modules
key: cache-node-modules-${{ hashFiles('package-lock.json') }}

- run: npx nx affected:build --parallel 4
- run: npx nx affected:build --parallel=3 --base=origin/develop

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit bff8da2

Please sign in to comment.