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

58 lines
1.4 KiB
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' }}
2021-11-15 23:16:53 +08:00
run: npm install --prefix webpack-plugin
2021-11-13 04:48:52 +08:00
2021-11-15 23:34:39 +08:00
- name: Install Playwright
run: npm run playwright-install
- name: Install OS Dependencies for Playwright
run: sudo npm run playwright-install-deps
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
2021-11-15 22:55:37 +08:00
2021-11-17 06:18:23 +08:00
- name: Compile webpack plugin
2021-11-16 05:16:09 +08:00
run: npm run compile --prefix webpack-plugin
- name: Package using webpack plugin
run: npm run smoketest --prefix webpack-plugin
2021-11-15 22:55:37 +08:00
- name: Run smoke test
run: npm run smoketest
2021-11-16 06:14:36 +08:00
- name: Build website
run: npm run build-website