2021-12-07 11:35:47 +01:00
|
|
|
name: 'cli'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: 'actions/checkout@v2'
|
|
|
|
|
|
|
|
- name: 'Use Node.js'
|
2021-11-30 14:51:20 +01:00
|
|
|
uses: 'actions/setup-node@v2.5.0'
|
2021-06-09 20:31:45 +02:00
|
|
|
with:
|
|
|
|
node-version: '16.x'
|
2021-07-01 10:00:18 +02:00
|
|
|
cache: 'npm'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- name: 'Install'
|
2021-07-01 10:00:18 +02:00
|
|
|
run: 'npm install'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
|
|
|
- run: 'npm run lint:editorconfig'
|
|
|
|
- run: 'npm run lint:markdown'
|
|
|
|
- run: 'npm run lint:typescript'
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: 'actions/checkout@v2'
|
|
|
|
|
|
|
|
- name: 'Use Node.js'
|
2021-11-30 14:51:20 +01:00
|
|
|
uses: 'actions/setup-node@v2.5.0'
|
2021-06-09 20:31:45 +02:00
|
|
|
with:
|
|
|
|
node-version: '16.x'
|
2021-07-01 10:00:18 +02:00
|
|
|
cache: 'npm'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- name: 'Install'
|
2021-07-01 10:00:18 +02:00
|
|
|
run: 'npm install'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- name: 'Build'
|
|
|
|
run: 'npm run build'
|
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: 'actions/checkout@v2'
|
|
|
|
|
2021-12-06 17:18:14 +01:00
|
|
|
- name: 'Use Docker'
|
|
|
|
uses: 'actions-hub/docker/cli@master'
|
|
|
|
env:
|
|
|
|
SKIP_LOGIN: true
|
|
|
|
|
2021-06-09 20:31:45 +02:00
|
|
|
- name: 'Use Node.js'
|
2021-11-30 14:51:20 +01:00
|
|
|
uses: 'actions/setup-node@v2.5.0'
|
2021-06-09 20:31:45 +02:00
|
|
|
with:
|
|
|
|
node-version: '16.x'
|
2021-07-01 10:00:18 +02:00
|
|
|
cache: 'npm'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- name: 'Install'
|
2021-07-01 10:00:18 +02:00
|
|
|
run: 'npm install'
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
- name: 'Test'
|
|
|
|
run: 'npm run test'
|