Skip to content

Commit

Permalink
clean ci-cd.yml + add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-marechal committed Oct 1, 2021
1 parent bf655d2 commit d3f4556
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- master
workflow_dispatch:


jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -36,13 +35,18 @@ jobs:

- name: Build
shell: bash
# Note: `yarn build` is done as part of `yarn install` already.
run: |
yarn install --no-lockfile
yarn build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

- name: Test
shell: bash
run: |
yarn test
publish:
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'theia-ide/tsp-typescript-client'
Expand All @@ -65,11 +69,11 @@ jobs:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Pre-Publish
- name: Pre-Publish
shell: bash
# Note: `yarn build` is done as part of `yarn install` already.
run: |
yarn install --no-lockfile
yarn build
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
Expand All @@ -83,4 +87,6 @@ jobs:
retry_on: error
command: yarn run publish:next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48
# The variable name comes from here:
# https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit d3f4556

Please sign in to comment.