Skip to content

Commit

Permalink
ci: build and test in separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 2, 2021
1 parent 06c7337 commit df96baa
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 12 deletions.
52 changes: 42 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,40 @@ on:
# - master

jobs:
Build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
atom_channel:
- stable
steps:
- uses: actions/checkout@v2
- uses: atom-community/action-setup-atom@v1
with:
channel: ${{ matrix.atom_channel }}

- name: Install dependencies and build
run: |
apm install
npm run clean
npm run tsc || echo done
npm run build
- name: Upload built files
uses: actions/upload-artifact@v2
with:
path: |
./dist
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: Build
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -24,11 +56,18 @@ jobs:
with:
channel: ${{ matrix.atom_channel }}

- name: Install dependencies and build
- name: Download articats
uses: actions/download-artifact@v2
- name: Place artifacts
shell: bash
run: |
rm -rf dist
mkdir ./dist
mv -r artifact/* ./dist
- name: Install dependencies
run: |
apm install
npm run tsc || echo done
npm run build
- name: Run tests 👩🏾‍💻
run: npm run test
Expand All @@ -55,10 +94,3 @@ jobs:

- name: Lint ✨
run: npm run test.lint

Skip:
if: contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- name: Skip CI 🚫
run: echo skip ci
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"build:services-docs": "markdox lib/services/index.js -o lib/services/README.md",
"build:plugin-docs": "markdox lib/plugin-api/hydrogen-provider.js lib/plugin-api/hydrogen-kernel.js -o docs/PluginAPI.md",
"build:docs": "npm run build:plugin-docs && npm run build:services-docs",
"build-commit": "npm run clean && build-commit -o dist",
"prepare": "npm run build"
"build-commit": "npm run clean && build-commit -o dist"
},
"atomTestRunner": "atom-jasmine3-test-runner",
"repository": "https://github.com/nteract/hydrogen",
Expand Down

0 comments on commit df96baa

Please sign in to comment.