chore(deps): lock file maintenance (#1734) #25
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: run tests | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'signatures/**' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'signatures/**' | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
jobs: | |
setup-node_modules: | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- uses: "nick-fields/[email protected]" | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm fetch --ignore-scripts | |
ci-deploy-client: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite | |
run: cd packages/deploy-client && pnpm test | |
- name: License Check | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cd packages/deploy-client && pnpm run license | |
ci-create-platformatic: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: platformatic cli global link | |
run: cd packages/cli && pnpm link --global && cd ../.. | |
- name: Setup local git user and email | |
run: | | |
git config --global user.name 'Platformatic Github Actions' | |
git config --global user.email '[email protected]' | |
- name: Run test suite | |
run: cd packages/create-platformatic && pnpm test | |
ci-cli: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 1 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite | |
run: cd packages/cli && pnpm test | |
- name: License Check | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cd packages/cli && pnpm run license | |
ci-config: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite config manager | |
run: cd packages/config && pnpm test | |
- name: Run test suite metaconfig | |
run: cd packages/metaconfig && pnpm test | |
ci-composer: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite with code coverage | |
run: cd packages/composer && pnpm run test; cd ../.. | |
ci-db: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: ikalnytskyi/action-setup-postgres@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: pnpm install -g typescript | |
run: pnpm install -g typescript | |
- name: Run test suite core | |
run: cd packages/db-core && pnpm test | |
- name: Run test suite Platformatic DB | |
run: cd packages/db && pnpm test | |
ci-db-authorization: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Start docker containers for testing | |
run: docker-compose up -d postgresql | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite | |
run: cd packages/db-authorization && pnpm test | |
ci-db-core-lint: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: pnpm install | |
run: pnpm install --frozen-lockfile | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Linting & Typescript for test suite sql-mapper | |
run: | | |
pnpm --filter="@platformatic/sql-mapper" run lint | |
pnpm --filter="@platformatic/sql-mapper" run test:typescript | |
- name: Linting & Typescript for test suite sql-json-schema-mapper | |
run: | | |
pnpm --filter="@platformatic/sql-json-schema-mapper" run lint | |
pnpm --filter="@platformatic/sql-json-schema-mapper" run test:typescript | |
- name: Linting & Typescript for test suite sql-openapi | |
run: | | |
pnpm --filter="@platformatic/sql-openapi" run lint | |
pnpm --filter="@platformatic/sql-openapi" run test:typescript | |
- name: Linting & Typescript for test suite sql-graphql | |
run: | | |
pnpm --filter="@platformatic/sql-graphql" run lint | |
pnpm --filter="@platformatic/sql-graphql" run test:typescript | |
- name: Linting & Typescript for test suite sql-events | |
run: | | |
pnpm --filter="@platformatic/sql-events" run lint | |
pnpm --filter="@platformatic/sql-events" run test:typescript | |
ci-db-core-test: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
db: [postgresql, mariadb, mysql, mysql8, sqlite] | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Start docker containers for testing | |
run: docker-compose up -d ${{ matrix.db }} | |
if: ${{ matrix.db != 'sqlite' }} | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Wait for DB | |
run: sleep 10 | |
if: ${{ matrix.db != 'sqlite' }} | |
- name: Run test suite sql-mapper | |
run: cd packages/sql-mapper && pnpm run test:${{ matrix.db }}; cd ../.. | |
- name: Run test suite sql-json-schema-mapper | |
run: cd packages/sql-json-schema-mapper && pnpm run test:${{ matrix.db }}; cd ../.. | |
- name: Run test suite sql-openapi | |
run: cd packages/sql-openapi && pnpm run test:${{ matrix.db }}; cd ../.. | |
- name: Run test suite sql-graphql | |
run: cd packages/sql-graphql && pnpm run test:${{ matrix.db }}; cd .. | |
ci-sql-events: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
db: [postgresql, mariadb, mysql, mysql8, sqlite] | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Start docker containers for testing | |
run: docker-compose up -d ${{ matrix.db }} | |
if: ${{ matrix.db != 'sqlite' }} | |
- name: Start redis containers for testing | |
run: docker-compose up -d redis | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Wait for DB | |
run: sleep 10 | |
if: ${{ matrix.db != 'sqlite' }} | |
- name: Run test suite sql-mapper | |
run: cd packages/sql-events && pnpm run test:${{ matrix.db }}; cd ../.. | |
ci-auth-login: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite | |
run: cd packages/authenticate && pnpm test; cd ../.. | |
ci-runtime: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run runtime package test suite | |
run: cd packages/runtime && pnpm test | |
ci-service: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite with code coverage | |
run: cd packages/service && pnpm run test; cd ../.. | |
ci-utils: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
uses: nick-fields/[email protected] | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run utils package test suite | |
run: cd packages/utils && pnpm test | |
ci-client: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- uses: "nick-fields/[email protected]" | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite with code coverage | |
run: cd packages/client && pnpm test | |
- name: Run test suite with code coverage for generator | |
run: cd packages/client-cli && pnpm test | |
ci-telemetry: | |
needs: setup-node_modules | |
runs-on: ${{matrix.os}} | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- uses: "nick-fields/[email protected]" | |
with: | |
max_attempts: 10 | |
timeout_minutes: 15 | |
retry_on: error | |
command: pnpm install --frozen-lockfile | |
- name: Run test suite | |
run: cd packages/telemetry && pnpm test | |
playwright-e2e: | |
needs: setup-node_modules | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Start docker containers for testing | |
run: docker-compose up -d postgresql | |
- name: pnpm install | |
run: pnpm install --frozen-lockfile | |
- name: Install Playwright browsers | |
run: cd packages/frontend-template && pnpm exec playwright install | |
- name: Run Platformatic frontend cli and E2E tests | |
run: | | |
node ./packages/cli/cli.js db migrations apply --config=./packages/frontend-template/test/e2e/fixtures/platformatic.e2e.db.json && | |
node ./packages/cli/cli.js db start --config=./packages/frontend-template/test/e2e/fixtures/platformatic.e2e.db.json & | |
sleep 5 && | |
rm -rf packages/frontend-template/src/platformatic-generated-code | |
mkdir -p packages/frontend-template/src/platformatic-generated-code && | |
cd packages/frontend-template/src/platformatic-generated-code && | |
node ../../../client-cli/cli.mjs http://127.0.0.1:9999 --frontend --language ts && | |
pnpm run test:types && | |
pnpm run test:e2e | |
dependency-check: | |
needs: setup-node_modules | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/[email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: pnpm install | |
id: install | |
run: | | |
pnpm install --production --frozen-lockfile 2>&1 | tee out | |
echo "pnpmoutput<<EOF" >> $GITHUB_OUTPUT | |
cat out >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: CLI must load | |
run: cd packages/cli && node cli.js | |
- name: Circular Dependency | |
if: contains(steps.install.outputs.pnpmoutput, 'cyclic') | |
run: exit 1 |