Skip to content

Commit ce5c2b5

Browse files
author
Alan Churley
committed
Adding sample automation for PR
1 parent b5cb29b commit ce5c2b5

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: on-pull-request
2+
on:
3+
pull_request
4+
5+
jobs:
6+
on_push:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Install packages
11+
run: |
12+
export NODE_ENV=dev
13+
npm ci
14+
npm run lerna-ci
15+
- name: Run lint
16+
run: npm run lerna-lint
17+
- name: Run tests
18+
run: npm run lerna-test
19+
- name: Report Coverage
20+
if: ${{ github.actor != 'dependabot[bot]' }}
21+
uses: romeovs/[email protected]
22+
with:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
lcov-file: ./packages/logger/coverage/lcov.info

.github/workflows/on-push.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
jobs:
66
on_push:
77
runs-on: ubuntu-latest
8+
if: ${{ github.event_name != 'pull_request' }}
89
steps:
910
- uses: actions/checkout@v2
1011
- name: Install packages
@@ -15,10 +16,4 @@ jobs:
1516
- name: Run lint
1617
run: npm run lerna-lint
1718
- name: Run tests
18-
run: npm run lerna-test
19-
- name: Report Coverage
20-
if: ${{ github.event_name == 'pull_request' }}
21-
uses: romeovs/[email protected]
22-
with:
23-
github-token: ${{ secrets.GITHUB_TOKEN }}
24-
lcov-file: ./packages/logger/coverage/lcov.info
19+
run: npm run lerna-test

0 commit comments

Comments
 (0)