-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d507a13
commit b4245d6
Showing
3 changed files
with
63 additions
and
171 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Cockroach Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
integration-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [20] | ||
cockroach_version: [19.2.12] | ||
fail-fast: false | ||
timeout-minutes: 10 | ||
|
||
services: | ||
cockroach: | ||
image: cockroachdb/cockroach:v${{ matrix.cockroach_version }} | ||
env: | ||
DATABASE_URL: postgresql://root@localhost:26257/integration_test | ||
# Set health checks to wait until cockroach has started | ||
options: >- | ||
start | ||
--insecure | ||
--host=localhost | ||
ports: | ||
# Maps tcp port 26257 on service container to the host | ||
- 26257:26257 | ||
|
||
name: 'Cockroach Test: cockroach-${{ matrix.cockroach_version }}, node-${{ matrix.node_version }}, ubuntu-latest' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
# Required for docs/versions tests | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | ||
|
||
- name: Set node version to ${{ matrix.node_version }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'pnpm' | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Integration Test | ||
run: pnpm run migrate up -m test/cockroach --no-lock && pnpm run migrate down 0 -m test/cockroach --no-lock --timestamps | ||
env: | ||
DATABASE_URL: postgresql://root@localhost:26257/integration_test |
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