Make installation available from other branches than the Infinum repo #901
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
# Run on PRs and pushes, only on significant changes. | |
push: | |
branches: | |
- develop | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
# Cancels all previous workflow runs for the same branch that have not yet completed. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Jest - Unit tests on Node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.allowed_failure }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [ '18' ] | |
allowed_failure: [ false ] | |
include: | |
# Test against latest Node version, but allow it to fail. | |
# We need success only on LTS versions. | |
- node: '20' | |
allowed_failure: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Node.js version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install node packages | |
run: npm install | |
- name: Install node packages in setup | |
working-directory: ./setup/create-wp-project | |
run: npm install | |
- name: Run coverage generation | |
run: npm run test:coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/clover.xml | |
flags: unittests | |
name: frontend-libs-codecov | |
fail_ci_if_error: true |