Skip to content

Commit 6ebb228

Browse files
fix: ci setting
1 parent 9ace829 commit 6ebb228

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,36 @@ jobs:
77
name: Jest
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Test
11-
run: echo ${GITHUB_EVENT_NAME}; echo ${GITHUB_REF};
12-
- name: Filter
13-
run: if [[ ${GITHUB_EVENT_NAME} == "push" && ${GITHUB_REF} != "refs/heads/master" ]]; then exit 78; fi
10+
# - name: Filter
11+
# run: if [[ ${GITHUB_EVENT_NAME} == "push" && ${GITHUB_REF} != "refs/heads/master" ]]; then exit 78; fi
1412
- uses: actions/checkout@v1
1513
with:
1614
fetch-depth: 1
15+
if: github.event_name == pull_request || github.ref == refs/heads/master
1716
- name: Install Package dependencies
1817
run: yarn install
18+
if: github.event_name == pull_request || github.ref == refs/heads/master
1919
- name: Run tests
2020
run: yarn cover
21+
if: github.event_name == pull_request || github.ref == refs/heads/master
2122
- name: Send covarage
2223
run: yarn add coveralls && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
2324
env:
2425
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
2526
COVERALLS_SERVICE_NAME: "GitHub Action"
2627
COVERALLS_SERVICE_JOB_ID: ${{ github.sha }}
28+
if: github.event_name == pull_request || github.ref == refs/heads/master
2729
- uses: 8398a7/action-slack@v1
2830
with:
2931
type: failure
3032
env:
3133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3234
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
33-
if: failure()
35+
if: (github.event_name == pull_request || github.ref == refs/heads/master) && failure()
3436
- uses: 8398a7/action-slack@v1
3537
with:
3638
type: success
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
40-
if: success()
42+
if: (github.event_name == pull_request || github.ref == refs/heads/master) && success()

0 commit comments

Comments
 (0)