|
6 | 6 | branches:
|
7 | 7 | - development
|
8 | 8 |
|
| 9 | +env: |
| 10 | + GITHUB_BRANCH: ${{ github.ref }} |
| 11 | + GITHUB_HEAD_REF: ${{ github.head_ref }} |
| 12 | + GITHUB_BASE_REF: ${{ github.base_ref }} |
| 13 | + GITHUB_COMMIT: ${{ github.sha }} |
| 14 | + |
9 | 15 | jobs:
|
10 | 16 | build:
|
11 |
| - |
12 | 17 | runs-on: ${{ matrix.os }}
|
13 | 18 |
|
14 | 19 | strategy:
|
15 | 20 | matrix:
|
16 |
| - os: [ubuntu-latest, macos-latest, windows-2016] |
| 21 | + os: [ubuntu-latest, macos-latest, windows-latest] |
17 | 22 | node-version: [12.x]
|
18 | 23 |
|
19 | 24 | steps:
|
20 |
| - - uses: actions/checkout@v1 |
21 |
| - - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} |
22 |
| - uses: actions/setup-node@v1 |
23 |
| - with: |
24 |
| - node-version: ${{ matrix.node-version }} |
25 |
| - - name: nodejs project information |
26 |
| - id: projectinfo |
27 |
| - uses: gregoranders/[email protected] |
28 |
| - - name: npm install |
29 |
| - run: | |
30 |
| - npm install |
31 |
| - - name: npm run build |
32 |
| - run: | |
33 |
| - npm run build |
34 |
| - env: |
35 |
| - GITHUB_BRANCH: ${{ github.ref }} |
36 |
| - GITHUB_COMMIT: ${{ github.sha }} |
37 |
| - PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
38 |
| - - name: npm test |
39 |
| - run: | |
40 |
| - npm test |
41 |
| - env: |
42 |
| - GITHUB_BRANCH: ${{ github.ref }} |
43 |
| - GITHUB_COMMIT: ${{ github.sha }} |
44 |
| - PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
45 |
| - - name: test coverage |
46 |
| - if: matrix.os == 'ubuntu-latest' |
47 |
| - uses: coverallsapp/github-action@master |
48 |
| - with: |
49 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
50 |
| - path-to-lcov: ./coverage/lcov.info |
51 |
| - env: |
52 |
| - CI: true |
53 |
| - GITHUB_CONTEXT: ${{ toJson(github) }} |
54 |
| - GITHUB_BRANCH: ${{ github.ref }} |
55 |
| - GITHUB_HEAD_REF: ${{ github.head_ref }} |
56 |
| - GITHUB_BASE_REF: ${{ github.base_ref }} |
57 |
| - GITHUB_COMMIT: ${{ github.sha }} |
58 |
| - - name: publish code coverage to code climate |
59 |
| - if: matrix.os == 'ubuntu-latest' |
60 |
| - |
61 |
| - env: |
62 |
| - CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }} |
63 |
| - GITHUB_BRANCH: ${{ github.ref }} |
64 |
| - GITHUB_COMMIT: ${{ github.sha }} |
65 |
| - PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
66 |
| - with: |
67 |
| - coverageCommand: npm run test |
68 |
| - debug: true |
69 |
| - - name: npm run it |
70 |
| - if: matrix.os == 'ubuntu-latest' |
71 |
| - run: | |
72 |
| - ls -lha /dev/shm |
73 |
| - sudo apt-get update |
74 |
| - sudo apt-get install xvfb |
75 |
| - sudo chmod 1777 /dev/shm |
76 |
| - npm run build |
77 |
| - xvfb-run --auto-servernum -- bash -c "npm run it" |
78 |
| - env: |
79 |
| - GITHUB_BRANCH: ${{ github.ref }} |
80 |
| - GITHUB_COMMIT: ${{ github.sha }} |
81 |
| - PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
82 |
| - - name: npm run dist |
83 |
| - run: | |
84 |
| - npm run dist |
85 |
| - env: |
86 |
| - GITHUB_BRANCH: ${{ github.ref }} |
87 |
| - GITHUB_COMMIT: ${{ github.sha }} |
88 |
| - PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
| 25 | + - uses: actions/checkout@v1 |
| 26 | + - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} |
| 27 | + uses: actions/setup-node@v1 |
| 28 | + with: |
| 29 | + node-version: ${{ matrix.node-version }} |
| 30 | + - name: nodejs project information |
| 31 | + id: projectinfo |
| 32 | + uses: gregoranders/[email protected] |
| 33 | + - name: npm install |
| 34 | + run: | |
| 35 | + npm install |
| 36 | + - name: npm run build |
| 37 | + run: | |
| 38 | + npm run build |
| 39 | + - name: npm test |
| 40 | + run: | |
| 41 | + npm test |
| 42 | + - name: test coverage |
| 43 | + if: matrix.os == 'ubuntu-latest' |
| 44 | + uses: coverallsapp/github-action@master |
| 45 | + with: |
| 46 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + path-to-lcov: ./test/coverage/lcov.info |
| 48 | + env: |
| 49 | + CI: true |
| 50 | + - name: publish code coverage to code climate |
| 51 | + if: matrix.os == 'ubuntu-latest' |
| 52 | + |
| 53 | + env: |
| 54 | + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
| 55 | + with: |
| 56 | + coverageCommand: npm run test |
| 57 | + coverageLocations: | |
| 58 | + ./test/coverage/lcov.info:lcov |
| 59 | + - name: npm run e2e |
| 60 | + if: matrix.os == 'ubuntu-latest' |
| 61 | + run: | |
| 62 | + sudo apt-get update |
| 63 | + sudo apt-get install xvfb |
| 64 | + sudo chmod 1777 /dev/shm |
| 65 | + npm run build |
| 66 | + xvfb-run --auto-servernum -- bash -c "npm run e2e" |
| 67 | + - name: npm run dist |
| 68 | + run: | |
| 69 | + npm run dist |
| 70 | + env: |
| 71 | + PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} |
0 commit comments