Default values in query params #455
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: Main CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
env: | |
CI: true | |
strategy: | |
matrix: | |
node-version: [16.x] | |
# Windows disabled for now, work it out later | |
platform: [macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Set git opts | |
run: | | |
git config --global core.autocrlf input | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ".yarn/cache" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install project | |
run: | | |
yarn install --immutable | |
- name: Format ReScript | |
run: | | |
yarn workspaces foreach run rescript format -all | |
- name: Build all projects | |
run: | | |
yarn build | |
# Since we don't want to have generated code formatted in the router we regenerate | |
# the router code after formatting. | |
- name: Sync router code generation | |
run: | | |
yarn workspaces foreach --topological-dev run router:generate | |
- name: git status | |
id: git_status | |
shell: bash | |
run: | | |
echo "::set-output name=status::$( git status --porcelain )" | |
- name: Exit if routes have not been properly regenerated and commited, or if formatting is incorrect | |
shell: bash | |
run: | | |
git diff && exit 1 | |
if: steps.git_status.outputs.status | |
- name: Run tests | |
if: runner.os != 'Windows' | |
run: | | |
yarn test |