Modernize #7
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: Node.js CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | ||
uses: './.github/actions/setup' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [install] | ||
steps: | ||
- name: Setup | ||
uses: './.github/actions/setup' | ||
- name: Build package | ||
run: yarn build | ||
- name: Temporarily save Docker image | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: dist | ||
retention-days: 1 | ||
lint and format: | ||
Check failure on line 34 in .github/workflows/cicd.yml GitHub Actions / Node.js CIInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
needs: [install] | ||
steps: | ||
- name: Setup | ||
uses: './.github/actions/setup' | ||
- name: Lint and Format | ||
run: yarn lint && yarn format | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [install] | ||
steps: | ||
- name: Setup | ||
uses: './.github/actions/setup' | ||
- name: Run unit tests | ||
run: yarn test | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
needs: [lint, build, test] | ||
steps: | ||
- name: Setup | ||
uses: './.github/actions/setup' | ||
- name: Retrieve saved build files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: dist | ||
- name: Deploy | ||
run: yarn release |