Using the old webpack version #182
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push] | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
- name: Compile | |
run: yarn && yarn add --dev @types/[email protected] && yarn build | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: yarn install | |
- name: Fix TypeScript compatibility | |
run: yarn add --dev @types/[email protected] | |
- name: Unit Test | |
run: yarn jest tests/unit | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: yarn install | |
- name: Integration Server Test | |
env: | |
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} | |
run: yarn jest tests/custom | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: yarn install | |
- name: Fix TypeScript compatibility | |
run: yarn add --dev @types/[email protected] | |
- name: Integration Server Test | |
env: | |
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} | |
run: yarn jest --coverage tests/unit tests/integration tests/custom | |
publish: | |
needs: [compile, unit-test, integration-test] | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && ! contains(github.ref, '0.0.0') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: yarn install | |
- name: Fix TypeScript compatibility | |
run: yarn add --dev @types/[email protected] | |
- name: Build | |
run: yarn build | |
- name: Publish to npm | |
run: | | |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} | |
npm publish --access public | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
delete-tag-if-code-generation-only: | |
needs: [compile, unit-test, integration-test] | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && contains(github.ref, '0.0.0') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: ClementTsang/[email protected] | |
with: | |
delete_release: true | |
tag_name: 0.0.0 # tag name to delete | |
env: | |
GITHUB_TOKEN: ${{ secrets.TAGGING_GITHUB_TOKEN }} |