|
1 | 1 | name: CI |
2 | 2 |
|
3 | | -on: [push] |
| 3 | +on: [push, pull_request] |
4 | 4 |
|
5 | 5 | jobs: |
6 | 6 | setup: |
7 | 7 | runs-on: ubuntu-18.04 |
8 | 8 |
|
9 | 9 | steps: |
10 | | - - uses: actions/checkout@v2 |
| 10 | + - uses: actions/checkout@v2 |
11 | 11 |
|
12 | | - - name: Get yarn cache |
13 | | - id: yarn-cache |
14 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
| 12 | + - name: Get yarn cache |
| 13 | + id: yarn-cache |
| 14 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
15 | 15 |
|
16 | | - - uses: actions/cache@v1 |
17 | | - with: |
18 | | - path: ${{ steps.yarn-cache.outputs.dir }} |
19 | | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
20 | | - restore-keys: | |
21 | | - ${{ runner.os }}-yarn- |
| 16 | + - uses: actions/cache@v1 |
| 17 | + with: |
| 18 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 19 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 20 | + restore-keys: | |
| 21 | + ${{ runner.os }}-yarn- |
22 | 22 |
|
23 | | - - name: Install Dependencies |
24 | | - run: yarn install |
| 23 | + - name: Install Dependencies |
| 24 | + run: yarn install |
25 | 25 |
|
26 | 26 | run-unit-tests: |
27 | 27 | runs-on: ubuntu-18.04 |
28 | 28 | needs: setup |
29 | 29 |
|
30 | 30 | steps: |
31 | | - - uses: actions/checkout@v2 |
| 31 | + - uses: actions/checkout@v2 |
32 | 32 |
|
33 | | - - name: Get yarn cache |
34 | | - id: yarn-cache |
35 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
| 33 | + - name: Get yarn cache |
| 34 | + id: yarn-cache |
| 35 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
36 | 36 |
|
37 | | - - name: Install Dependencies |
38 | | - run: yarn install |
| 37 | + - name: Install Dependencies |
| 38 | + run: yarn install |
39 | 39 |
|
40 | | - - name: Run Prettier (Check) |
41 | | - run: yarn prettier-check |
| 40 | + - name: Run Prettier (Check) |
| 41 | + run: yarn prettier-check |
42 | 42 |
|
43 | | - - name: Run Jest |
44 | | - run: yarn test --coverage --runInBand |
| 43 | + - name: Run Jest |
| 44 | + run: yarn test --coverage --runInBand |
45 | 45 |
|
46 | 46 | build-macos: |
47 | 47 | runs-on: macos-10.15 |
48 | 48 | needs: setup |
49 | 49 |
|
50 | 50 | steps: |
51 | | - - uses: actions/checkout@v2 |
| 51 | + - uses: actions/checkout@v2 |
52 | 52 |
|
53 | | - - name: Get yarn cache |
54 | | - id: yarn-cache |
55 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
| 53 | + - name: Get yarn cache |
| 54 | + id: yarn-cache |
| 55 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
56 | 56 |
|
57 | | - - name: Install Dependencies |
58 | | - run: yarn install |
| 57 | + - name: Install Dependencies |
| 58 | + run: yarn install |
59 | 59 |
|
60 | | - - name: Build |
61 | | - run: yarn build |
| 60 | + - name: Build |
| 61 | + run: yarn build |
62 | 62 |
|
63 | | - - name: Pack (electron-builder) |
64 | | - run: yarn pack |
| 63 | + - name: Pack (electron-builder) |
| 64 | + run: yarn pack |
65 | 65 |
|
66 | | - - name: Make macOS (electron-builder) |
67 | | - env: |
68 | | - CSC_LINK: ${{ secrets.mac_certs }} |
69 | | - CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }} |
70 | | - run: yarn make:macos |
| 66 | + - name: Make macOS (electron-builder) |
| 67 | + env: |
| 68 | + CSC_LINK: ${{ secrets.mac_certs }} |
| 69 | + CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }} |
| 70 | + run: yarn make:macos |
71 | 71 |
|
72 | | - - name: Clean up builds |
73 | | - run: rm -rfv dist/mac dist/Gitify-*.dmg* |
| 72 | + - name: Clean up builds |
| 73 | + run: rm -rfv dist/mac dist/Gitify-*.dmg* |
74 | 74 |
|
75 | | - - uses: actions/upload-artifact@v1 |
76 | | - with: |
77 | | - name: Gitify-dist |
78 | | - path: dist |
| 75 | + - uses: actions/upload-artifact@v1 |
| 76 | + with: |
| 77 | + name: Gitify-dist |
| 78 | + path: dist |
0 commit comments