Merge branch 'develop' into fk_as_value #12936
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: UI - Lint, Audit and Tests | |
on: | |
push: | |
paths: | |
- 'mathesar_ui/**' | |
pull_request: | |
paths: | |
- 'mathesar_ui/**' | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mathesar_ui | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- id: npm-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm ci --no-audit --prefer-offline | |
- run: npm run check-format | |
lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mathesar_ui | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- id: npm-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm ci --no-audit --prefer-offline | |
- run: npm run lint | |
typecheck: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mathesar_ui | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- id: npm-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm ci --no-audit --prefer-offline | |
- run: npm run typecheck | |
audit: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mathesar_ui | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- id: npm-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm ci | |
- uses: oke-py/[email protected] | |
with: | |
audit_level: moderate | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
create_pr_comments: false | |
dedupe_issues: true | |
working_directory: './mathesar_ui' | |
issue_labels: 'restricted: maintainers,type: bug,work: frontend,status: triage' | |
production_flag: true | |
continue-on-error: true | |
tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mathesar_ui | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- id: npm-cache-dir | |
run: echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- run: npm ci --no-audit --prefer-offline | |
- run: npm test |