Commit df58f8e9 authored by tom's avatar tom

all checks workflow

parent 80ef2b1c
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
- 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
- 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
- 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
- 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
\ No newline at end of file
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
\ No newline at end of file
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
\ No newline at end of file
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