1 - webapp #1
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
# This workflow performs basic checks: | ||
# | ||
# 1. run a preparation step to install and cache node modules | ||
# 2. once prep succeeds, run lint and test in parallel | ||
# | ||
# The checks are skipped on the 'main' branch. The project relies on branch | ||
# protection to avoid pushes straight to 'main'. | ||
name: Checks | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'main' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
prep: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
id: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
- name: Install | ||
run: yarn install | ||
lint: | ||
needs: prep | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
id: cache-node-modules | ||
working-directory: ./webapp | ||
Check failure on line 60 in .github/workflows/webapp.yaml GitHub Actions / ChecksInvalid workflow file
|
||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
- name: Install | ||
run: yarn install | ||
working-directory: ./webapp | ||
- name: Lint | ||
run: yarn lint | ||
working-directory: ./webapp | ||
# Docker container build | ||
build: | ||
needs: prep | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
id: cache-node-modules | ||
working-directory: ./webapp | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
- name: Install | ||
run: yarn install | ||
working-directory: ./webapp | ||
- name: Build container | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64 | ||
context: . | ||
file: dockerfiles/Dockerfile | ||
push: false | ||
tags: "polder:dev" |