Add build steps to workflow #979
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: ['**', '!backport/**', '!whitesource-remediate/**'] | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
branches: ['**'] | |
paths-ignore: | |
- '**/*.md' | |
jobs: | |
lint-test: | |
runs-on: ${{ matrix.os }} | |
name: Lint and Test on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
- name: Setup Yarn | |
run: | | |
npm uninstall -g yarn | |
npm i -g [email protected] | |
yarn install --frozen-lockfile | |
- name: Run linter | |
run: yarn lint | |
- name: Run unit tests | |
run: yarn test-unit | |
build: | |
runs-on: ubuntu-latest | |
name: Build on ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
- name: Setup Yarn | |
run: | | |
npm uninstall -g yarn | |
npm i -g [email protected] | |
yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: dist/ | |
- name: Build Docs | |
run: yarn build-docs | |
- name: Upload doc artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: docs/ |