Skip to content

Commit 59bac8e

Browse files
committed
ci: build and test in separate jobs
1 parent 06c7337 commit 59bac8e

File tree

2 files changed

+45
-14
lines changed

2 files changed

+45
-14
lines changed

.github/workflows/CI.yml

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ on:
66
# - master
77

88
jobs:
9-
Test:
9+
Build:
1010
if: "!contains(github.event.head_commit.message, '[skip ci]')"
11-
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
1211
runs-on: ${{ matrix.os }}
1312
strategy:
1413
fail-fast: false
1514
matrix:
1615
os:
1716
- ubuntu-latest
18-
- macos-latest
19-
- windows-latest
20-
atom_channel: [stable, beta]
17+
atom_channel:
18+
- stable
2119
steps:
2220
- uses: actions/checkout@v2
2321
- uses: atom-community/action-setup-atom@v1
@@ -27,9 +25,50 @@ jobs:
2725
- name: Install dependencies and build
2826
run: |
2927
apm install
28+
29+
npm run clean
3030
npm run tsc || echo done
31+
32+
npm run clean
3133
npm run build
3234
35+
- name: Upload built files
36+
uses: actions/upload-artifact@v2
37+
with:
38+
path: |
39+
./dist
40+
41+
Test:
42+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
43+
needs: Build
44+
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os:
50+
- ubuntu-latest
51+
# - macos-latest
52+
# - windows-latest
53+
atom_channel: [beta]
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: atom-community/action-setup-atom@v1
57+
with:
58+
channel: ${{ matrix.atom_channel }}
59+
60+
- name: Download articats
61+
uses: actions/download-artifact@v2
62+
- name: Place artifacts
63+
shell: bash
64+
run: |
65+
rm -rf dist
66+
mv artifact/* ./
67+
68+
- name: Install production dependencies
69+
run: |
70+
apm install --production
71+
3372
- name: Run tests 👩🏾‍💻
3473
run: npm run test
3574

@@ -55,10 +94,3 @@ jobs:
5594

5695
- name: Lint ✨
5796
run: npm run test.lint
58-
59-
Skip:
60-
if: contains(github.event.head_commit.message, '[skip ci]')
61-
runs-on: ubuntu-latest
62-
steps:
63-
- name: Skip CI 🚫
64-
run: echo skip ci

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"build:services-docs": "markdox lib/services/index.js -o lib/services/README.md",
4949
"build:plugin-docs": "markdox lib/plugin-api/hydrogen-provider.js lib/plugin-api/hydrogen-kernel.js -o docs/PluginAPI.md",
5050
"build:docs": "npm run build:plugin-docs && npm run build:services-docs",
51-
"build-commit": "npm run clean && build-commit -o dist",
52-
"prepare": "npm run build"
51+
"build-commit": "npm run clean && build-commit -o dist"
5352
},
5453
"atomTestRunner": "atom-jasmine3-test-runner",
5554
"repository": "https://github.com/nteract/hydrogen",

0 commit comments

Comments
 (0)