Skip to content

Commit

Permalink
MNT Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 1, 2023
1 parent c9bdd34 commit 416675d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
script: [ 'lint-md', 'lint-js', 'lint-php', 'lint-language' ]
name: ${{ matrix.script }}
steps:

- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Read .nvmrc
id: read-nvm
run: |
NPM_VERSION=$(cat .nvmrc)
echo "version=$NPM_VERSION" >> $GITHUB_OUTPUT
- name: Install NPM
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
with:
node-version: ${{ steps.read-nvm.outputs.version }}

- name: Install yarn
run: npm install --global yarn

- name: Install PHP
if: ${{ matrix.script == 'lint-php' }}
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.0
with:
php-version: 8.1

- name: Run lint
run: yarn ${{ matrix.script }}

0 comments on commit 416675d

Please sign in to comment.