diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dc1153fdd..4e38b094f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,8 +6,41 @@ 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 clean + 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: @@ -24,11 +57,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: | - apm install - npm run tsc || echo done - npm run build + rm -rf dist + mv artifact/* ./ + + - name: Install dependencies + run: | + apm install --production + npm install --only=dev # needed for testing - name: Run tests 👩🏾‍💻 run: npm run test @@ -55,10 +95,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 diff --git a/package.json b/package.json index cf3923f9a..5264a85d6 100644 --- a/package.json +++ b/package.json @@ -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",