From 12aea18188c6f4c01bde4a80b4a6b51e6d4209e5 Mon Sep 17 00:00:00 2001 From: svetlanaMuravlova Date: Tue, 31 Aug 2021 14:24:32 +0300 Subject: [PATCH] feat(gh actions): try gh actions --- .github/workflows/on-push-or-pull.yml | 32 ++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-push-or-pull.yml b/.github/workflows/on-push-or-pull.yml index 54178f0..c082d1e 100644 --- a/.github/workflows/on-push-or-pull.yml +++ b/.github/workflows/on-push-or-pull.yml @@ -57,4 +57,34 @@ jobs: with: path: ${{ env.CACHE_DIST_PATH }} key: dist-${{ github.run_id }} - - run: npx ng build --runner cloud --prod + - run: npx ng build --prod + + # run unit tests + unit_tests_with_coverage: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ${{ env.CACHE_NODE_MODULES_PATH }} + key: node_modules-${{ hashFiles('**/package-lock.json') }} + - uses: actions/cache@v2 + with: + path: ${{ env.CACHE_DIST_PATH }} + key: dist-${{ github.run_id }} + - run: npm run test-coverage + - run: npx codecov ./coverage/ + continue-on-error: true + + # run linting + linting: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ${{ env.CACHE_NODE_MODULES_PATH }} + key: node_modules-${{ hashFiles('**/package-lock.json') }} + - run: npm run lint