Commit fc1cb043 authored by tom goriunov's avatar tom goriunov Committed by GitHub

Merge pull request #917 from blockscout/optimize-workflow-run

"Check" workflow enhancements
parents 0c8394f3 62cbcfd8
...@@ -2,15 +2,36 @@ name: Checks ...@@ -2,15 +2,36 @@ name: Checks
on: on:
workflow_dispatch: workflow_dispatch:
pull_request: pull_request:
types: [ opened, synchronize, unlabeled ]
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.husky/**'
- '.vscode/**'
- 'deploy/**'
- 'docs/**'
- 'public/**'
- 'stub/**'
push: push:
branches: branches:
- main - main
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.husky/**'
- '.vscode/**'
- 'deploy/**'
- 'docs/**'
- 'public/**'
- 'stub/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
lint: code_quality:
name: ESLint name: Code quality
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'WIP')" if: ${{ !contains(github.event.pull_request.labels.*.name, 'WIP') && !(github.event.action == 'unlabeled' && github.event.label.name != 'WIP') }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
...@@ -29,31 +50,12 @@ jobs: ...@@ -29,31 +50,12 @@ jobs:
- name: Run ESLint - name: Run ESLint
run: yarn lint:eslint run: yarn lint:eslint
type_check:
name: TypeScript
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'WIP')"
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
- name: Compile TypeScript - name: Compile TypeScript
run: yarn lint:tsc run: yarn lint:tsc
jest_tests: jest_tests:
name: Run unit tests with Jest name: Run unit tests with Jest
needs: [ lint, type_check ] needs: [ code_quality ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
...@@ -75,10 +77,10 @@ jobs: ...@@ -75,10 +77,10 @@ jobs:
pw_tests: pw_tests:
name: Run components visual tests with PlayWright name: Run components visual tests with PlayWright
needs: [ lint, type_check ] needs: [ code_quality ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: mcr.microsoft.com/playwright:v1.28.0-focal image: mcr.microsoft.com/playwright:v1.32.0-focal
steps: steps:
- name: Install git-lfs - name: Install git-lfs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment