Skip to content

Tusk Sanity Check

Tusk Sanity Check #31

name: Tusk Sanity Check
on:
workflow_dispatch:
inputs:
taskId:
description: "Tusk Task ID"
required: true
runType:
description: "Tusk Run Type"
required: true
runId:
description: "Tusk Run ID"
required: true
jobs:
sanity_check:
runs-on: ubuntu-latest
steps:
- name: Log inputs/branch
run: |
echo "Tusk Task ID: ${{ github.event.inputs.taskId }}"
echo "Tusk Run Type: ${{ github.event.inputs.runType }}"
echo "Tusk Run ID: ${{ github.event.inputs.runId }}"
echo "Branch: ${{ github.ref }}"
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.event.repository.default_branch }}
# Space delimited list usable as command-line argument list in Linux shell. If needed, it uses single or double quotes to wrap filename with unsafe characters.
list-files: 'shell'
filters: |
web:
- 'web/**/*'
bifrost:
- 'bifrost/**/*'
worker:
- 'worker/**/*'
- name: Set Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install bifrsot dependencies
if: steps.filter.outputs.bifrost == 'true'
run: yarn install
working-directory: ./bifrost
- name: Bifrost lint fix
if: steps.filter.outputs.bifrost == 'true'
run: yarn lint-fix
working-directory: ./bifrost
- name: Install web dependencies
if: steps.filter.outputs.web == 'true'
run: yarn install
working-directory: ./web
- name: Web lint fix
if: steps.filter.outputs.web == 'true'
run: yarn lint-fix
working-directory: ./web
- name: Install worker dependencies
if: steps.filter.outputs.worker == 'true'
run: yarn install
working-directory: ./worker
- name: Worker lint fix
if: steps.filter.outputs.worker == 'true'
run: yarn lint-fix
working-directory: ./worker
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "fix(${{ github.run_id }}): auto linting"
skip_fetch: true
skip_checkout: true
- name: Web build
if: steps.filter.outputs.web == 'true'
run: |
cp ../.env.example .env
yarn build
working-directory: ./web
- name: Bifrost build
if: steps.filter.outputs.bifrost == 'true'
run: |
yarn build
working-directory: ./bifrost