Skip to content

Fix: region => location #3383

Fix: region => location

Fix: region => location #3383

name: Lint & Build & Test (core)
on:
push:
paths:
- core/**
- .github/workflows/build-and-test-core.yml
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install minimal stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: cargo, rustfmt, rust-std, rustc
- name: checkout
uses: actions/checkout@v3
- name: Install Redis
uses: chenjuneking/redis-setup-action@v1
with:
version: "7.2.5"
hostPort: 5434
containerPort: 6379
- name: Install Postgres
uses: dust-tt/postgresql-action@6730e69fe23f4f2989c19edf9e6e0d7ffeb0a05c
with:
postgresql docker image: mirror.gcr.io/postgres
postgresql version: "14.13"
postgresql db: oauth
postgresql user: test
postgresql password: test
postgresql port: 5433
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: core
- name: Lint
working-directory: core
run: cargo fmt --all -- --check
- name: Setup Tables
working-directory: core
run: cargo run --bin init_db
env:
OAUTH_DATABASE_URI: "postgres://test:test@localhost:5433/oauth"
- name: Test
working-directory: core
run: cargo test --all
env:
DISABLE_API_KEY_CHECK: "true"
OAUTH_DATABASE_URI: "postgres://test:test@localhost:5433/oauth"
REDIS_URI: "redis://localhost:5434"
OAUTH_ENCRYPTION_KEY: ${{ secrets.TEST_OAUTH_ENCRYPTION_KEY }}