Public Access
Add proper logging, make commands modularized, add new commands and add event handler
Run cargo test / Run tests (push) Has been cancelled
Run cargo test / Run tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
name: Run cargo test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
DATABASE_URL: postgres://postgres:postgres@postgres:5432/tg_dev_srv_bot
|
||||
DISCORD_TOKEN: testing
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: tg_dev_srv_bot
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev
|
||||
|
||||
- name: Set up Rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
Reference in New Issue
Block a user