monaco-editor/.github/workflows/ci.yml

40 lines
981 B
YAML
Raw Normal View History

2021-11-13 04:48:52 +08:00
name: CI
on: [push, pull_request]
jobs:
build:
2021-11-13 04:55:00 +08:00
name: CI
2021-11-13 04:48:52 +08:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache node modules
id: cacheNodeModules
uses: actions/cache@v2
with:
2021-11-14 02:40:20 +08:00
path: '**/node_modules'
2021-11-13 04:48:52 +08:00
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-cacheNodeModules-
2021-11-13 04:55:00 +08:00
- name: Install node modules (1)
2021-11-13 04:48:52 +08:00
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm install
2021-11-13 04:55:00 +08:00
- name: Install node modules (2)
2021-11-13 04:48:52 +08:00
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm install --prefix monaco-editor-webpack-plugin
2021-11-15 18:58:26 +08:00
- name: Check prettier
run: npm run prettier-check
2021-11-13 04:48:52 +08:00
- name: Build
run: npm run release
- name: Run unit tests
run: npm test