name: Run Tests

on:
  push:
    branches:
      - '**'
  pull_request:
    branches:
      - main
      - 'release/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  run_tests:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      - name: Install dependencies
        run: |
          sudo apt-get update && sudo apt-get install -y make libfontconfig1-dev pkg-config

      - name: Run tests
        run: make test
