Add OpenStack Authentication to Api #33
Workflow file for this run
This file contains 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: test | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- '**/src/**/*' | |
- '**/tests/**/*' | |
- 'Cargo.toml' | |
- '**/Cargo.toml' | |
- 'Cargo.lock' | |
- '**/Cargo.lock' | |
- '.github/workflows/test.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
SQLX_VERSION: 0.7.3 | |
SQLX_FEATURES: "rustls,postgres" | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Rust Cache Action | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: sqlx-${{ env.SQLX_VERSION }} | |
- name: Install sqlx-cli | |
run: | |
cargo install sqlx-cli | |
--version=${{ env.SQLX_VERSION }} | |
--features ${{ env.SQLX_FEATURES }} | |
--no-default-features | |
--locked | |
- name: Install postgresql-client and mold | |
run: sudo apt update && sudo apt install postgresql-client mold -y | |
- name: Migrate database | |
run: SKIP_DOCKER=true ./scripts/init_db.sh | |
- name: Check sqlx offline data is up to date | |
run: cargo sqlx prepare --workspace --check | |
- name: Run tests | |
run: cargo test | |
# coverage: | |
# name: coverage | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: checkout | |
# uses: actions/checkout@v4 | |
# - name: install rust toolchain | |
# uses: dtolnay/rust-toolchain@stable | |
# - name: install rust cache | |
# uses: Swatinem/rust-cache@v2 | |
# - name: run coverage check | |
# uses: actions-rs/[email protected] | |
# with: | |
# version: '0.15.0' | |
# args: '--workspace --fail-under 5 --exclude-files **/src/cli/* --exclude-files **/tests/*' |