Created
August 10, 2020 15:02
-
-
Save rockchalkwushock/353393436d4d04e8c5f73109932f3ca6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Name of this workspace. | |
name: CI | |
# Listens for PR's being opened and updated. | |
on: pull_request | |
jobs: | |
# My job | |
review_code: | |
# Environment to execute in. | |
runs-on: ubuntu-latest | |
steps: | |
# Install repository | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
# Install environment dependencies | |
- name: Install Node | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: 12.13.1 | |
# Setup caching of node_modules. | |
- name: Get Cache Directory | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
# Cache deps | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install repositories dependencies. | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
# Run the commands I want to check the codebase (i.e. linting, type-checking, testing) | |
- name: Running Eslint | |
run: yarn lint | |
- name: Running TypeScript Compiler | |
run: yarn type-check | |
- name: Running Jest | |
run: yarn test | |
# TODO: Research other "actions" from the community to use. | |
# TODO: Write "custom actions" if I need too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment