Skip to content

Add Brave-Constellation-Rev header support, ignore requests with ol… #490

Add Brave-Constellation-Rev header support, ignore requests with ol…

Add Brave-Constellation-Rev header support, ignore requests with ol… #490

Workflow file for this run

on:
push:
pull_request:
name: Checks
jobs:
test:
runs-on: ubuntu-latest
env:
CARGO_PROFILE_DEV_DEBUG: '0' # reduce size of target directory
services:
postgres:
image: postgres
env:
POSTGRES_USER: star
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: minimal
components: clippy, rustfmt
toolchain: 1.71
override: true
- name: Cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Format
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
with:
command: fmt
args: --check
- name: Install diesel
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: --force diesel_cli
- name: Run db migration
run: diesel migration run
env:
DATABASE_URL: "postgres://star:password@localhost:5432/postgres"
- name: Build/Test
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: test
env:
TEST_DATABASE_URL: "postgres://star:password@localhost:5432/postgres"
- name: Test Client Format
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: fmt
args: --check --manifest-path misc/test-client/Cargo.toml
- name: Test Client Build
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: build
args: --release --all-targets --manifest-path misc/test-client/Cargo.toml