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

Commit

Permalink
Merge pull request #81 from technote-space/chore/chore-sync-workflows
Browse files Browse the repository at this point in the history
chore: sync workflows
  • Loading branch information
technote-space authored May 19, 2020
2 parents 8a92850 + f607f46 commit 73d9176
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
cover:
name: Coverage
needs: eslint
runs-on: ubuntu-latest
runs-on: ${{matrix.os}}
timeout-minutes: 10
strategy:
matrix:
node: ['11', '12']
os: [ubuntu-latest, ubuntu-16.04, macos-latest]
steps:
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
Expand All @@ -83,25 +83,20 @@ jobs:
run: echo "::set-env name=RUNNING::"
if: "! env.GIT_DIFF"
- name: Set running flag
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
if: "matrix.os == 'ubuntu-latest' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
run: echo "::set-env name=RUNNING::1"
- name: Set running flag
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && startsWith(github.base_ref, 'refs/heads/develop/v')"
if: "matrix.os == 'ubuntu-latest' && ! startsWith(github.ref, 'refs/tags/') && startsWith(github.base_ref, 'refs/heads/develop/v')"
run: echo "::set-env name=RUNNING::1"
- name: Set running flag
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
if: matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v')
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
with:
node-version: ${{ matrix.node }}
if: env.RUNNING
- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -128,7 +123,7 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/lcov.info
if: env.RUNNING && matrix.node == '12'
if: env.RUNNING && matrix.os == 'ubuntu-latest'

release:
name: Release GitHub Actions
Expand Down

0 comments on commit 73d9176

Please sign in to comment.