feat(generate.yml): add GitHub Actions workflow to generate liquibase… #65
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 will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
pull_request: | |
jobs: | |
build: | |
name: Node ${{ matrix.node-version }}, Postgres ${{ matrix.postgres }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x, 16.x, 18.x, 20.x] | |
postgres: [9, 11, 13, 15] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache Yarn | |
uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
with: | |
path: web/node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }} | |
# Install dependencies | |
- run: yarn --frozen-lockfile | |
# Run Linters | |
- run: yarn lint | |
# Run Tests | |
- run: yarn test |