Skip to content

🎚️ Tuning Functionality, Support for devenv.sh & Making root a Cargo Workspace #23

🎚️ Tuning Functionality, Support for devenv.sh & Making root a Cargo Workspace

🎚️ Tuning Functionality, Support for devenv.sh & Making root a Cargo Workspace #23

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
BOT_TOKEN: ~
SERVER_ADDRESS: ~
SERVER_PORT: ~
LAVALINK_SERVER_PASSWORD: ~
DATABASE_URL: postgres://user:password@localhost:5432/db
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v1
- name: Setup Mold
uses: rui314/setup-mold@v1
- name: Rust Cache
uses: Swatinem/rust-cache@v2.5.0
- name: Setup Database
working-directory: database
run: |
cargo install sqlx-cli --no-default-features --features native-tls,postgres
cargo sqlx database setup
- name: Setup .env
run: touch .env
- name: Build And Test
run: |
cargo build --verbose --release
cargo test --verbose --release