merlon 1.3.1

Mod package manager for the Paper Mario (N64) decompilation
Documentation
name: Test

on:
  push:
  pull_request:
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dtolnay/rust-toolchain@master
      with:
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Download base ROM
      run: curl -L $BASEROM_US_URL -o tests/baserom.z64
      env:
        BASEROM_US_URL: ${{ secrets.BASEROM_US_URL }}
    
    - name: Set git user for tests
      run: |
        git config --global user.name "GitHub Actions"
        git config --global user.email "merlongithubactions@nanaian.town"

    - name: Run tests
      run: cargo test --verbose --no-fail-fast
      env:
        RUST_BACKTRACE: full
        RUST_LOG: debug

  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dtolnay/rust-toolchain@master
      with:
        toolchain: nightly
        components: clippy, rustfmt
    - run: cargo check
  
  # TODO: clippy and rustfmt