Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to latest setup-gel action #1230

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ jobs:
yarn format

- name: Install Gel
uses: geldata/setup-gel@6763b6de72782d9c2e5ecc1095986a1c707da68f
uses: geldata/setup-gel@358410cc5618fa956d16f1b7157a8c86f9b517cf # v1.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is our trusted action, so just using v1 is fine.

with:
instance-name: test
server-version: ${{ matrix.gel-version }}
cli-version: ${{ matrix.gel-version == 'nightly' && 'nightly' || 'stable' }}
# should be updated to use gel cli
- name: Show actual Gel server version
run: |
echo ACTIVE_GEL_VERSION=$(edgedb query 'select sys::get_version_as_str()' -I test) >> $GITHUB_ENV
echo ACTIVE_GEL_VERSION=$(gel query 'select sys::get_version_as_str()' -I test) >> $GITHUB_ENV
# should be updated to use gel cli
- name: Install postgis extension
if: ${{ matrix.gel-version == 'nightly' || matrix.gel-versoin == '6.0-rc.2' }}
run: |
edgedb extension install postgis -I test --slot 6-alpha-3
gel extension install postgis -I test --slot 6-alpha-3

- name: Run package tests
run: |
Expand Down Expand Up @@ -131,14 +131,14 @@ jobs:
- name: Build and pack CLI wrapper
run: |
yarn workspace gel run build
yarn workspace gel pack --filename=${{ github.workspace }}/edgedb-cli.tar.gz
yarn workspace gel pack --filename=${{ github.workspace }}/gel-cli.tar.gz

- name: Test CLI wrapper with npm
run: |
mkdir ${{ runner.temp }}/temp-npm
cd ${{ runner.temp }}/temp-npm
npm init -y
npm install ${{ github.workspace }}/edgedb-cli.tar.gz
npm install ${{ github.workspace }}/gel-cli.tar.gz
npm exec gel -- project init --non-interactive
npm exec gel -- --version
npm exec gel -- query 'select sys::get_version_as_str()'
Expand All @@ -154,7 +154,7 @@ jobs:
mkdir ${{ runner.temp }}/temp-yarn
cd ${{ runner.temp }}/temp-yarn
yarn init -y
yarn add ${{ github.workspace}}/edgedb-cli.tar.gz
yarn add ${{ github.workspace}}/gel-cli.tar.gz
yarn gel project init --non-interactive
yarn gel --version
yarn gel query 'select sys::get_version_as_str()'
Expand All @@ -176,7 +176,7 @@ jobs:
yarn set version berry
yarn init -y
touch yarn.lock
yarn add ${{ github.workspace }}/edgedb-cli.tar.gz
yarn add ${{ github.workspace }}/gel-cli.tar.gz
yarn gel project init --non-interactive
yarn gel --version
yarn gel query 'select sys::get_version_as_str()'
Expand All @@ -196,7 +196,7 @@ jobs:
mkdir ${{ runner.temp }}/temp-pnpm
cd ${{ runner.temp}}/temp-pnpm
pnpm init
pnpm add ${{ github.workspace }}/edgedb-cli.tar.gz
pnpm add ${{ github.workspace }}/gel-cli.tar.gz
pnpm exec gel project init --non-interactive
pnpm exec gel --version
pnpm exec gel query 'select sys::get_version_as_str()'
Expand All @@ -213,7 +213,7 @@ jobs:
mkdir temp-bun
cd temp-bun
bun init
bun add ${{ github.workspace }}/edgedb-cli.tar.gz
bun add ${{ github.workspace }}/gel-cli.tar.gz
bun gel project init --non-interactive
bun gel --version
bun gel query 'select sys::get_version_as_str()'
Expand Down
12 changes: 6 additions & 6 deletions packages/gel/test/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const getServerCommand = (
"--port=auto",
"--emit-server-status=" + statusFile,
`--security=${strictSecurity ? "strict" : "insecure_dev_mode"}`,
"--bootstrap-command=ALTER ROLE edgedb { SET password := 'edgedbtest' }",
"--bootstrap-command=create superuser role geltestuser { set password := 'geltest' }",
];
return { args, availableFeatures };
};
Expand Down Expand Up @@ -206,8 +206,8 @@ export const startServer = async (
const config: ConnectConfig = {
host: "localhost",
port: runtimeData.port,
user: "edgedb",
password: "edgedbtest",
user: "geltestuser",
password: "geltest",
tlsSecurity: "no_host_verification",
};

Expand Down Expand Up @@ -297,20 +297,20 @@ export async function applyMigrations(
if (process.platform === "win32") {
await runCommand("wsl", [
"-u",
"edgedb",
"gel",
"env",
...Object.entries(configToEnv(config)).map(
([key, val]) => `${key}=${val}`,
),
"edgedb",
"gel",
"migrate",
...(params?.flags || []),
"--schema-dir",
getWSLPath(path.join(process.cwd(), "dbschema")),
]);
} else {
await runCommand(
"edgedb",
"gel",
["migrate", ...(params?.flags || [])],
configToEnv(config),
);
Expand Down
Loading