ci: fix environment variables setup in GitHub Actions workflow #50
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| api: | |
| name: API Service | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_DB: lucidata_test | |
| POSTGRES_USER: lucidata | |
| POSTGRES_PASSWORD: password | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run cargo check | |
| working-directory: ./api | |
| run: cargo check | |
| - name: Run cargo test | |
| working-directory: ./api | |
| run: cargo test | |
| env: | |
| DATABASE_URL: postgres://lucidata:password@localhost:5432/lucidata_test | |
| llm_engine: | |
| name: LLM Engine Service | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run cargo check | |
| working-directory: ./llm_engine | |
| run: cargo check | |
| - name: Run cargo test | |
| working-directory: ./llm_engine | |
| run: cargo test | |
| query_runner: | |
| name: Query Runner Service | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run cargo check | |
| working-directory: ./query_runner | |
| run: cargo check | |
| - name: Run cargo test | |
| working-directory: ./query_runner | |
| run: cargo test |