feat: Split console_session auth into console_session_with_workspace
and console_session_without_workspace
#1132
Workflow file for this run
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: Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
test: | |
name: Test (Node.js v${{ matrix.node }} on ${{ matrix.os_name }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
node: | |
- "18" | |
- "20" | |
include: | |
- os: ubuntu-latest | |
os_name: Linux | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node_version: ${{ matrix.node }} | |
- name: Test | |
run: npm test | |
lint: | |
name: Lint (Node.js v${{ matrix.node }}) | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- "18" | |
- "20" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node_version: ${{ matrix.node }} | |
- name: Lint | |
run: npm run lint | |
build: | |
name: Build | |
uses: ./.github/workflows/_build.yml | |
install: | |
name: Install (Node.js v${{ matrix.node }} on ${{ matrix.os_name }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
node: | |
- "18" | |
- "20" | |
include: | |
- os: ubuntu-latest | |
os_name: Linux | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build.outputs.artifact_name }} | |
path: . | |
- name: Find packages | |
uses: tj-actions/glob@v17 | |
id: packages | |
with: | |
files: "*.tgz" | |
- name: Create package.json | |
uses: DamianReeves/write-file-action@v1.2 | |
with: | |
write-mode: overwrite | |
path: package.json | |
contents: | | |
{"type":"module"} | |
- name: Create index.js | |
uses: DamianReeves/write-file-action@v1.2 | |
with: | |
write-mode: overwrite | |
path: index.js | |
contents: | | |
import '@seamapi/fake-seam-connect' | |
- name: Install | |
run: npm install --save ${{ steps.packages.outputs.paths }} | |
- name: Run | |
run: node index.js | |
typecheck: | |
name: Typecheck (Node.js v${{ matrix.node }}) | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- "18" | |
- "20" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node_version: ${{ matrix.node }} | |
- name: Typecheck | |
run: npm run typecheck | |
dependencies: | |
name: Dependencies | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Check for dependencies | |
run: | | |
if [[ "$(jq -j .dependencies < package.json)" != "null" ]]; then | |
echo "No direct dependencies allowed, only devDependencies" | |
exit 1 | |
fi | |
containerize: | |
name: Containerize | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Docker | |
uses: ./.github/actions/setup-docker | |
with: | |
registry_domain: ghcr.io | |
registry_username: ${{ secrets.GH_USER }} | |
registry_password: ${{ secrets.GH_TOKEN }} | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
cache-from: "type=local,src=/tmp/.buildx-cache" | |
cache-to: "type=local,dest=/tmp/.buildx-cache" | |
tags: ghcr.io/${{ github.repository }}:smoke-${{ github.sha }} | |
smoke: | |
name: Smoke test | |
needs: containerize | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
services: | |
app: | |
image: ghcr.io/${{ github.repository }}:smoke-${{ github.sha }} | |
options: "--init --read-only" | |
env: | |
NODE_ENV: test | |
ports: | |
- 8080 | |
credentials: | |
username: ${{ secrets.GH_USER }} | |
password: ${{ secrets.GH_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Test | |
run: curl http://localhost:$PORT/health | |
env: | |
PORT: ${{ job.services.app.ports['8080'] }} |