chore(edit): migrate @entur/dropdown from v4 to v5 #331
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: Linting, Testing and Formatting | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
changes: | |
name: Check for file changes | |
runs-on: ubuntu-latest | |
outputs: | |
tavla: ${{ steps.filter.outputs.tavla }} | |
next_tavla: ${{ steps.filter.outputs.next_tavla }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
tavla: | |
- 'tavla/**' | |
next_tavla: | |
- 'next-tavla/**' | |
tavla_linting_and_formatting: | |
needs: changes | |
if: ${{ needs.changes.outputs.tavla == 'true' }} | |
name: Verifies linting and formatting for tavla | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: tavla | |
steps: | |
- uses: actions/checkout@v3 | |
# See https://github.com/actions/cache/blob/main/examples.md#node---yarn-2 | |
- id: yarn-cache-dir-path | |
name: Get yarn cache path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install | |
run: yarn install | |
- name: ESLint | |
run: yarn eslint | |
- name: StyleLint | |
run: yarn stylelint | |
- name: Prettier | |
run: yarn prettier | |
next_tavla_linting_testing_and_formatting: | |
needs: changes | |
if: ${{ needs.changes.outputs.next_tavla == 'true' }} | |
name: Verifies linting and formatting for next-tavla | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: next-tavla | |
steps: | |
- uses: actions/checkout@v3 | |
# See https://github.com/actions/cache/blob/main/examples.md#node---yarn-2 | |
- id: yarn-cache-dir-path | |
name: Get yarn cache path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install | |
run: yarn install | |
- name: Linting | |
run: yarn lint | |
- name: Type checking | |
run: yarn typecheck | |
- name: Jest | |
run: yarn test | |
- name: Cypress | |
uses: cypress-io/github-action@v5 | |
with: | |
working-directory: next-tavla | |
component: true | |
all_jobs_pass: | |
name: All jobs pass or skip | |
needs: | |
[tavla_linting_and_formatting, next_tavla_linting_testing_and_formatting] | |
if: ${{ !failure() }} # Needs this to run in case of skipped checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: All jobs passed | |
run: exit 0 |