-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (74 loc) · 2.23 KB
/
Copy pathpullRequest.yml
File metadata and controls
77 lines (74 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: pull-request
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited] # https://frontside.com/blog/2020-05-26-github-actions-pull_request/
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Install Dependencies
run: npm ci
- name: Jest Tests and Coverage
run: npm run test_coverage
env:
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }}
SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }}
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }}
- uses: vebr/jest-lcov-reporter@v0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage/lcov.info
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Install Dependencies
run: npm ci
- name: Prettify Code
run: npm run format
- name: Commit any changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Install Dependencies
run: npm ci
- name: Lint Code
run: npm run lint
- name: Commit any changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
build:
needs: [test, format, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Install Dependencies
run: npm ci
- name: Build Code
run: npm run build
- name: Commit any changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions