Skip to content

Instantly share code, notes, and snippets.

@fersilva16
Created May 20, 2022 15:00
Show Gist options
  • Save fersilva16/f762faa58b0bdd5a129af21b0b6dc5a0 to your computer and use it in GitHub Desktop.
Save fersilva16/f762faa58b0bdd5a129af21b0b6dc5a0 to your computer and use it in GitHub Desktop.
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
container: node:16-alpine
steps:
- uses: actions/checkout@v3
- 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
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps
run: yarn
- name: Test
run: yarn jest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment