Skip to content

Fix workflow syntax #164

Fix workflow syntax

Fix workflow syntax #164

Workflow file for this run

name: test
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubicloud-standard-2-arm]
postgres: [15]
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Configure sccache
run: |

Check failure on line 26 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 26
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTFLAGS='--cfg profile=ci-build'" >> $GITHUB_ENV
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Cache cargo deps
uses: Swatinem/rust-cache@v2
with:
workspaces:
| lantern_cli
| lantern_extras
- name: Setup test env
run: SETUP_POSTGRES=1 SETUP_TESTS=1 ./ci/scripts/build.sh
env:
PG_VERSION: ${{ matrix.postgres }}
- name: Install extension
run: |
cargo install cargo-pgrx --version 0.11.3
cargo pgrx init "--pg$PG_VERSION" /usr/bin/pg_config
env:
PG_VERSION: ${{ matrix.postgres }}
- name: Run postgres
run: RUN_POSTGRES=1 ./ci/scripts/build.sh
env:
PG_VERSION: ${{ matrix.postgres }}
- name: Run tests
run: cargo test --workspace --exclude lantern_extras -- --nocapture --test-threads=1
env:
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
COHERE_TOKEN: ${{ secrets.COHERE_TOKEN }}
DB_URL: 'postgres://[email protected]:5432/postgres'