name: test

on:
  push:
    branches:
      - '*'
    tags:
      - '*'
  pull_request:
  workflow_dispatch:
  schedule:
    # Weekly Monday 9AM build
    # * is a special character in YAML so you have to quote this string
    - cron: '0 9 * * 1'

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

jobs:
  check:
    uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c0fde6f7e926df6ed7057255d29afa9c1ad5320  # v1.16.0
    with:
      envs: |
        - linux: check-style
  test:
    uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c0fde6f7e926df6ed7057255d29afa9c1ad5320  # v1.16.0
    with:
      envs: |
        - linux: py310-oldestdeps
        - linux: py311-cov
          coverage: codecov
          pytest-results-summary: true
        - macos: py311
          pytest-results-summary: true
        - linux: py312
        - linux: py3-dev
