Replies: 1 comment
-
| Oh I've almost forgotten. Here's the Github action file which isn't working for me: name: Test Packages
on:
  push:
    branches:
      - main
  pull_request:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v3
      - name: Set up Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Test workspace
        run: |
          SQLX_OFFLINE_DIR=$PWD/.sqlx SQLX_OFFLINE=true DATABASE_URL=postgres://localhost/repro-pg cargo testI've tried these variations of the command and they all fail: 
 Each with a bunch of different combinations of  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there!
I've been attempting to set up CI for a workspace project that has the following shape:
Now, all of this is actually working, with some workarounds locally. The problem is a few things, which mostly make it tough to set up on new machines (or re-setup locally), and make CI very tough to reason about.
I have a repro repo here
Basically the issues I'm experiencing are these:
cargo sqlx prepare --workspaceseems to assume that I'm using one database adapter; it wants to know what the database url is for the whole root, and it more or less ignores individual crates if that is set, as well asSQL_OFFLINE=truelater.cargo sqlx db createignores the workspace entirely, and so I have to describe the sqlite connection string in such a way that it works no matter the path origin. In other words, I can't set a relative path in the crate and have that work from the root and the crate. (Also, it tends to ignoresqlite:memory:entirely for maybe the same reason?)I know this isn't on the happy path, and there might be some design compromises I should make. That's understandable, I just would love to make sure I'm not missing anything obvious. Is there anything I can do to make multiple database kinds in a workspace a little more maintainable?
Beta Was this translation helpful? Give feedback.
All reactions