Skip to content

🏗️ Project Restructure #29

🏗️ Project Restructure

🏗️ Project Restructure #29

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/[email protected]
- 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
cargo test --verbose