Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow

Add CI tasks to GitHub Workflows

Changed files
+53
.github
workflows
+53
.github/workflows/ci.yml
···
···
+
name: CI
+
+
on:
+
pull_request:
+
push:
+
branches: main
+
+
jobs:
+
check:
+
name: Checks
+
runs-on: ubuntu-latest
+
timeout-minutes: 10
+
steps:
+
- name: Checkout Repo
+
uses: actions/checkout@v2
+
with:
+
fetch-depth: 0
+
- name: Setup Node
+
uses: actions/setup-node@v1
+
with:
+
node-version: '14'
+
- name: Get Yarn cache directory
+
id: yarn-cache-dir-path
+
run: echo "::set-output name=dir::$(yarn cache dir)"
+
- name: Use Yarn cache
+
uses: actions/cache@v2
+
id: yarn-cache
+
with:
+
path: |
+
~/.cache/Cypress
+
${{ steps.yarn-cache-dir-path.outputs.dir }}
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+
restore-keys: |
+
${{ runner.os }}-yarn-
+
- name: Use node_modules cache
+
id: node-modules-cache
+
uses: actions/cache@v2
+
with:
+
path: node_modules
+
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
+
- name: Install Dependencies
+
if: |
+
steps.yarn-cache.outputs.cache-hit != 'true' ||
+
steps.node-modules-cache.outputs.cache-hit != 'true'
+
run: yarn install --prefer-offline --frozen-lockfile --non-interactive --silent
+
- name: TypeScript
+
run: yarn run check
+
- name: Linting
+
run: yarn run lint
+
- name: Unit Tests
+
run: yarn run test --maxWorkers=2
+
- name: Build
+
run: yarn run build