name: pytest

on:
  # Run tests on all pushed branches
  push:
    branches:
      - "*"
  # Run tests on PR, prior to merge to main & development.
  pull_request:
    branches:
      - main
  # Allow manual trigger (workflow_dispatch)
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    environment:
      name: "test"
    container:
      image: ghcr.io/hotosm/fmtm-splitter:ci

    steps:
      - uses: actions/checkout@v4
      - name: Run pytest
        run: |
          pytest