Skip to content

Fix duplicate github actions and add cancel workflow #105

Fix duplicate github actions and add cancel workflow

Fix duplicate github actions and add cancel workflow #105

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
test:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use desired version of Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Npm install and build
run: |
npm ci
npm run build
- name: Composer install and set phpcs
run: |
composer install
composer phpcs
- name: Running lint check
run: npm run lint