You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

87 lines
1.6 KiB

name: Github Actions
on: [ push, pull_request ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Node.js
uses: actions/setup-node@master
with:
node-version: 10.x
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn --ignore-engines
- name: Lint JavaScript files using ESLint
run: yarn lint
ci:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 8.x, 10.x, 12.x ]
steps:
- uses: actions/checkout@master
- name: Install Node.js
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn --ignore-engines
- name: Run tests
run: yarn test
- name: Publish code coverage results
run: yarn coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
cd:
name: Publish
needs: [ lint, ci ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Node.js
uses: actions/setup-node@master
with:
node-version: 10.x
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn --ignore-engines
- name: 'Build "pegjs/dist/*.js" files'
run: yarn build-dist
- name: Publish pegjs@dev to NPM
run: node tools/publish-dev
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}