Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
liulifox233 committed Nov 28, 2024
1 parent f8b01ec commit 172c7aa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
MEDIA_USER_TOKEN: ${{ secrets.MEDIA_USER_TOKEN }}

jobs:
check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check
run: cargo check --verbose
- name: Run tests
run: cargo test --verbose
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,7 @@ mod tests {

#[tokio::test]
async fn test_apple_music() {
let args: Vec<String> = std::env::args().collect();
let media_user_token = args
.get(2)
.expect("MEDIA_USER_TOKEN not provided")
.to_string();
let media_user_token = std::env::var("MEDIA_USER_TOKEN").unwrap();
let apple_music_downloader =
AppleMusicDownloader::new_with_media_user_token(&media_user_token)
.await
Expand Down

0 comments on commit 172c7aa

Please sign in to comment.