Skip to content

Unable to run github actions #5

@shivan-eyespace

Description

@shivan-eyespace

Bug report

Describe the bug

I am running this as a github action on our codebase.

We have a monorepo structured like so.

| ...other projects files
| database/
|- |migrations/`*.sql`
|- `postgrestools.jsonc`
|- other `.sql` files not related to migrations (e.g. hydration script)

To Reproduce

Run this as a github action.

name: Lint DB

on:
  pull_request:
defaults:
  run:
    working-directory: database

jobs:
  lint-db:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: supabase-community/pglt-cli-action@main
        with:
          version: 0.2.0
      - run: postgrestools check . --changed

postgrestools.jsonc

{
	"$schema": "https://pgtools.dev/latest/schema.json",
	"vcs": {
		"enabled": false,
		"clientKind": "git",
		"useIgnoreFile": false,
		"defaultBranch": "main"
	},
	"files": {
		"ignore": []
	},
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true
		},
		"ignore": [
			"banDropColumn",
			"banDropTable"
		]
	}
}

Expected behavior

Lint to run

Screenshots

Error message:

Encountered an unexpected error

This is a bug in PgLT, not an error in your code, and we would appreciate it if you could report it along with the following information to help us fixing the issue:

Source Location: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.2/src/pool/inner.rs:535:5
Thread Name: main
Message: this functionality requires a Tokio context
Image

System information

On Github Actions

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions