WebStudio/.github/workflows/main.yml

50 lines
1.5 KiB
YAML
Raw Normal View History

2020-04-19 13:54:27 +00:00
# This is a basic workflow to help you get started with Actions
name: Checks
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
typescript:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
2020-04-19 16:31:42 +00:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
2020-04-19 13:54:27 +00:00
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install --frozen-lockfile
# Type checks
- name: TypeScript Error Reporter
2020-04-19 13:58:57 +00:00
uses: icrawl/action-tsc@v1
2020-04-19 13:54:27 +00:00
# ESLint
- name: ESLint Action
2020-04-19 14:08:20 +00:00
run: node_modules/.bin/eslint src/ --ext .ts,.tsx
# Prettier
- name: Prettier
run: node_modules/.bin/prettier -c 'src/**/*.{js,ts,tsx,css,scss}'