Skip to content

Commit

Permalink
Updating GH actions workflow env
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMcCormickJr committed Dec 4, 2024
1 parent 3d6130c commit 38c6b52
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# .github/workflows/rust.yml

name: Rust
name: Rust CI

on:
push:
Expand All @@ -10,7 +8,6 @@ on:

env:
CARGO_TERM_COLOR: always
DATABASE_URL: "mysql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@localhost/bville_recycle"

jobs:
build:
Expand Down Expand Up @@ -40,10 +37,15 @@ jobs:
sudo mysql -e "GRANT ALL PRIVILEGES ON bville_recycle.* TO '${{ secrets.DB_USER }}'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
- name: Create .env File
run: |
echo "DATABASE_URL=mysql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@localhost/bville_recycle" > .env
- name: Run Database Migrations (if any)
run: cargo run --bin migration -- up # Adjust this to your migration setup if applicable

- name: Build the Project
run: cargo build --verbose

- name: Run Tests
env:
DATABASE_URL: "mysql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@localhost/bville_recycle"
run: cargo test --verbose

0 comments on commit 38c6b52

Please sign in to comment.