mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-21 19:11:34 +08:00
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: Testing
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
jest:
|
|
name: Jest
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- uses: actions/cache@v1
|
|
name: Yarn Cache
|
|
id: yarn-cache
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- name: Yarn Install
|
|
run: yarn --no-audit --prefer-offline
|
|
- name: Jest
|
|
run: yarn run tests:jest-coverage
|
|
- name: Submit Coverage
|
|
run: |
|
|
./node_modules/.bin/codecov
|
|
shell: bash
|