feat(cli): support reading auth token in CLI with --auth-token
and in ENV with MERMAID_CHART_AUTH_TOKEN
#106
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: Build | |
on: | |
pull_request: | |
push: | |
jobs: | |
test: | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node: ['18.18.x'] | |
pkg: ['sdk', 'cli'] | |
runs-on: | |
labels: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies for ${{ matrix.pkg }} | |
run: | | |
pnpm install --frozen-lockfile --filter='...${{ matrix.pkg }}' | |
- name: Lint (if present) ${{ matrix.pkg }} | |
run: pnpm --if-present --filter='${{ matrix.pkg }}' lint | |
- name: Test ${{ matrix.pkg }} | |
run: | | |
pnpm --filter='${{ matrix.pkg }}' test | |
- name: E2E tests (if present) for ${{ matrix.pkg }} | |
env: | |
TEST_MERMAIDCHART_API_TOKEN: ${{ secrets.TEST_MERMAIDCHART_API_TOKEN }} | |
run: | | |
pnpm --if-present --filter='${{ matrix.pkg }}' test:e2e |