This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Prorations (#975) #2199
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: Unit Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
SQLX_OFFLINE: true | |
jobs: | |
test: | |
name: ${{ matrix.os }}-rust-${{ matrix.rust }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.rust != 'stable' }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@v2 | |
# Start Docker Compose | |
- name: Start Docker Compose | |
run: docker compose up -d | |
- uses: actions-rs/toolchain@v1 | |
name: Install toolchain | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
# Cache dependencies and build artifacts | |
- name: Cache build artifacts and dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
env: | |
SQLX_OFFLINE: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
env: | |
BACKBLAZE_BUCKET_ID: ${{ secrets.BACKBLAZE_BUCKET_ID }} | |
BACKBLAZE_KEY: ${{ secrets.BACKBLAZE_KEY }} | |
BACKBLAZE_KEY_ID: ${{ secrets.BACKBLAZE_KEY_ID }} | |
S3_ACCESS_TOKEN: ${{ secrets.S3_ACCESS_TOKEN }} | |
S3_SECRET: ${{ secrets.S3_SECRET }} | |
S3_URL: ${{ secrets.S3_URL }} | |
S3_REGION: ${{ secrets.S3_REGION }} | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
SQLX_OFFLINE: true | |
DATABASE_URL: postgresql://labrinth:labrinth@localhost/postgres |