App test #250
This file contains 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: Test | |
on: | |
push: | |
pull_request: | |
merge_group: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# https://nodejs.org/en/about/releases/ | |
node: [ '18', '20' ] | |
fail-fast: false | |
name: Node.js ${{ matrix.node }} - test | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup and Build | |
uses: ./.github/actions/setup-and-build | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Test Project | |
run: export NODE_OPTIONS=--max-old-space-size=6144; npm test | |
- name: Test building apidocs | |
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run apidocs | |
- name: Test building docs | |
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run docs:build | |
- name: publint | |
run: npx publint | |
- name: validate package | |
run: npx @arethetypeswrong/cli $(npm pack) | |
example: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# https://nodejs.org/en/about/releases/ | |
node: [ '18', '20' ] | |
fail-fast: false | |
name: Node.js ${{ matrix.node }} - example | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup and Build | |
uses: ./.github/actions/setup-and-build | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Test building examples (CJS) | |
run: | | |
pushd examples/echo-bot-ts-cjs | |
npm run build-sdk | |
npm install | |
npm run build | |
- name: Test Node.js App | |
uses: ./.github/actions/app-test | |
with: | |
port: '3000' | |
method: 'GET' | |
- name: Test building examples (ESM) | |
run: | | |
popd | |
pushd examples/echo-bot-ts-esm | |
npm run build-sdk | |
npm install | |
npm run build |