Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

chore: sync workflows #35

Merged
merged 2 commits into from
Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
PREFIX_FILTER: |
src/
__tests__/
SUFFIX_FILTER: .ts
SUFFIX_FILTER: |
.js
.ts
FILES: .eslintrc
if: "! contains(env.COMMIT_MESSAGE, '[skip ci]') && ! contains(env.COMMIT_MESSAGE, '[ci skip]')"
- name: Set running flag
Expand Down Expand Up @@ -52,8 +54,8 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

jest:
name: Jest
cover:
name: Coverage
needs: eslint
runs-on: ubuntu-latest
strategy:
Expand All @@ -70,7 +72,10 @@ jobs:
PREFIX_FILTER: |
src/
__tests__/
SUFFIX_FILTER: .ts
SUFFIX_FILTER: |
.js
.ts
.snap
FILES: |
yarn.lock
jest.config.js
Expand All @@ -81,6 +86,11 @@ jobs:
- name: Set running flag
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/')
run: echo "::set-env name=RUNNING::1"
- name: Set running flag
run: |
if [[ ! -f package.json ]] || ! < package.json jq -r '.scripts | keys[]' | grep -qe '^cover$'; then
echo "::set-env name=RUNNING::"
fi

- name: Setup node
uses: actions/setup-node@v1
Expand Down Expand Up @@ -124,7 +134,7 @@ jobs:

release:
name: Release GitHub Actions
needs: jest
needs: cover
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down Expand Up @@ -158,7 +168,7 @@ jobs:

package:
name: Publish Package
needs: jest
needs: cover
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
strategy:
Expand Down Expand Up @@ -214,6 +224,7 @@ jobs:
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
if: matrix.target == 'gpr'
- uses: 8398a7/action-slack@v2
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_CONTEXT_CHECK: true