Skip to content

Project migration

Project migration #2

Workflow file for this run

name: PR check
on:
pull_request:
jobs:
install-dependencies:
name: Install Dependencies
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-deps.outputs.cache-key }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
corepack-enable: true
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Upload node_modules as artifact
uses: actions/upload-artifact@v3
with:
name: node_modules
path: node_modules
- name: Upload yarn cache
id: cache-deps
uses: actions/cache@v3
with:
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
run-lint:
name: Run Lint
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download node_modules artifact
uses: actions/download-artifact@v3
with:
name: node_modules
path: node_modules
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
corepack-enable: true
- name: Run lint
run: yarn lint
- name: Lint Report
uses: dorny/test-reporter@v1
if: success()
with:
name: Lint
- name: Lint Summary
uses: test-summary/action@v2
with:
paths: 'reports/lint.xml'
run-tests:
name: Run Tests
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download node_modules artifact
uses: actions/download-artifact@v3
with:
name: node_modules
path: node_modules
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
corepack-enable: true
- name: Run tests
run: yarn test
- name: Test Report
uses: dorny/test-reporter@v1
if: success()
with:
name: Tests
path: reports/junit.xml
reporter: jest-junit
- name: Test Summary
uses: test-summary/action@v2
with:
paths: 'reports/junit.xml'
run-typecheck:
name: Run Type Check
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download node_modules artifact
uses: actions/download-artifact@v3
with:
name: node_modules
path: node_modules
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
corepack-enable: true
- name: Run type check
run: yarn typecheck
- name: Type Check Report
uses: dorny/test-reporter@v1
if: success()
with:
name: Type Check
- name: Type Check Summary
uses: test-summary/action@v2
with:
paths: 'reports/typecheck.xml'