Skip to content

chore(deps): update actions/cache action to v4 #110

chore(deps): update actions/cache action to v4

chore(deps): update actions/cache action to v4 #110

Workflow file for this run

name: Build
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/[email protected]
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: 18.x
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
cache: npm
- run: 'npm ci'
- run: 'npm run build:lib'
- name: 'unit test'
run: 'npm run test'
- name: 'prepare test'
run: 'npm link dist/ngx-vcard/'
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run playwright
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
directory: ./coverage
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
- name: 'release'
if: github.ref == 'refs/heads/master'
run: |
npm run semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_USERNAME: ${{ secrets.NPM_USER }}