Merge pull request #299 from UniversityRadioYork/ash-node-fix #541
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
- 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 | |
- name: Install Poetry | |
run: pipx install poetry | |
- 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 |