mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Merge pull request #689 from blockscout/check-workflow
all checks workflow
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
name: Checks
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: ESLint
|
||||
runs-on: ubuntu-latest
|
||||
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: Run ESLint
|
||||
run: yarn lint:eslint
|
||||
|
||||
type_check:
|
||||
name: TypeScript
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
run: yarn lint:tsc
|
||||
|
||||
jest_tests:
|
||||
name: Run unit tests with Jest
|
||||
needs: [ lint, type_check ]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ false }} # disable since there are no jest test yet
|
||||
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: Run Jest
|
||||
run: yarn test:jest
|
||||
|
||||
pw_tests:
|
||||
name: Run components visual tests with PlayWright
|
||||
needs: [ lint, type_check ]
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.28.0-focal
|
||||
|
||||
steps:
|
||||
- name: Install git-lfs
|
||||
run: apt-get update && apt-get install git-lfs
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
- 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: Run PlayWright
|
||||
run: HOME=/root yarn test:pw
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report
|
||||
retention-days: 10
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Linters
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check_code:
|
||||
name: Run code checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Run ESLint
|
||||
run: yarn lint:eslint
|
||||
- name: Compile TypeScript
|
||||
run: yarn lint:tsc
|
||||
@@ -1,48 +0,0 @@
|
||||
name: Unit tests
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
# jest_tests:
|
||||
# name: Run tests with Jest
|
||||
# runs-on: ubuntu-latest
|
||||
# if: ${{ false }} # disable since there are no jest test yet
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 18
|
||||
# cache: 'yarn'
|
||||
# - name: Install dependencies
|
||||
# run: yarn install --frozen-lockfile
|
||||
# - name: Run tests
|
||||
# run: yarn test:jest
|
||||
|
||||
pw_tests:
|
||||
name: Run components visual tests with PlayWright
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.28.0-focal
|
||||
|
||||
steps:
|
||||
- run: apt-get update && apt-get install git-lfs
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
lfs: 'true'
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Run your tests
|
||||
run: HOME=/root yarn test:pw
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report
|
||||
Reference in New Issue
Block a user