mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-10-10 23:29:18 +08:00
Dedicated test workflow to run on PRs (#172)
This commit is contained in:
committed by
GitHub
parent
446775978f
commit
958f67c802
46
.github/workflows/test-workflow.yml
vendored
Normal file
46
.github/workflows/test-workflow.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Test commit or pull request
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
eslint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Read .nvmrc
|
||||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
||||
id: nvm
|
||||
|
||||
- name: Use Node.js (.nvmrc)
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ steps.nvm.outputs.NVMRC }}"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test with eslint
|
||||
run: npm run test:eslint
|
||||
|
||||
sass-lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Read .nvmrc
|
||||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
||||
id: nvm
|
||||
|
||||
- name: Use Node.js (.nvmrc)
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ steps.nvm.outputs.NVMRC }}"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test with sass-lint
|
||||
run: npm run test:sass-lint
|
Reference in New Issue
Block a user