WebStudio/.github/workflows/main.yml

65 lines
1.9 KiB
YAML
Raw Permalink 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:
2023-03-11 12:40:24 +00:00
branches: [master]
2020-04-19 13:54:27 +00:00
pull_request:
2023-03-11 12:40:24 +00:00
branches: [master]
2020-04-19 13:54:27 +00:00
# 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:
2023-03-11 12:40:24 +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-
# 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
uses: icrawl/action-tsc@v1
# ESLint
- name: ESLint Action
run: node_modules/.bin/eslint src/ --ext .ts,.tsx
# Prettier
- name: Prettier
run: node_modules/.bin/prettier -c 'src/**/*.{js,ts,tsx,css,scss}'
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2023-03-11 12:42:36 +00:00
- name: Install Poetry
run: pipx install poetry
2023-03-11 12:40:24 +00:00
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: poetry
- run: poetry install --with=dev
- name: MyPy checks
run: poetry run mypy *.py