musixmatch-inofficial/.gitea/workflows/ci.yaml
2026-06-01 01:19:34 +02:00

56 lines
2.1 KiB
YAML

name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
Test:
runs-on: cimaster-latest
services:
warpproxy:
image: thetadev256/warpproxy
env:
WARP_DEVICE_ID: ${{ secrets.WARP_DEVICE_ID }}
WARP_ACCESS_TOKEN: ${{ secrets.WARP_ACCESS_TOKEN }}
WARP_LICENSE_KEY: ${{ secrets.WARP_LICENSE_KEY }}
WARP_PRIVATE_KEY: ${{ secrets.WARP_PRIVATE_KEY }}
steps:
- name: 📦 Checkout repository
uses: actions/checkout@v3
- name: 🦀 Setup Rust cache
uses: https://github.com/Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: 📎 Clippy
run: cargo clippy --all -- -D warnings
- name: 🧪 Test
# run: cargo nextest run --config-file ~/.config/nextest.toml --profile ci --retries 2 -j 1 --workspace
run: cargo test --workspace -- --nocapture --test-threads 1
env:
RUST_LOG: debug
ALL_PROXY: "http://warpproxy:8124"
MUSIXMATCH_EMAIL: ${{ secrets.MUSIXMATCH_EMAIL }}
MUSIXMATCH_PASSWORD: ${{ secrets.MUSIXMATCH_PASSWORD }}
CAPMONSTER_KEY: ${{ secrets.CAPMONSTER_KEY }}
# - name: Move test report
# if: always()
# run: mv target/nextest/ci/junit.xml junit.xml || true
# - name: 💌 Upload test report
# if: always()
# uses: https://code.forgejo.org/forgejo/upload-artifact@v4
# with:
# name: test
# path: |
# junit.xml
# - name: 🔗 Artifactview PR comment
# if: ${{ always() && github.event_name == 'pull_request' }}
# run: |
# if [[ "$GITEA_ACTIONS" == "true" ]]; then RUN_NUMBER="$GITHUB_RUN_NUMBER"; else RUN_NUMBER="$GITHUB_RUN_ID"; fi
# curl -SsL --fail-with-body -w "\n" -X POST https://av.thetadev.de/.well-known/api/prComment -H "Content-Type: application/json" \
# --data '{"url": "'"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$RUN_NUMBER"'", "pr": ${{ github.event.number }}, "artifact_titles": {"test":"🧪 Test report"}, "artifact_paths": {"test":"/junit.xml?viewer=1"}}'