Add fmin/fmax as per-station quality parameters #71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sourcespec_testruns | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v2 | |
| - v2-rebase-main | |
| paths: | |
| - 'sourcespec/**' | |
| - 'setup.py' | |
| - 'pyproject.toml' | |
| pull_request: | |
| paths: | |
| - 'sourcespec/**' | |
| - 'setup.py' | |
| - 'pyproject.toml' | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10"] | |
| steps: | |
| - name: Checkout sourcespec | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # full history to ensure tags are available for version resolution | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install sourcespec | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . cartopy nllgrid | |
| # TODO: Remove this step when v2 is retired | |
| - name: Create source_spec alias for v2 branches | |
| if: >- | |
| ( | |
| github.ref == 'refs/heads/v2' || | |
| github.ref == 'refs/heads/v2-rebase-main' | |
| ) || | |
| ( | |
| github.event_name == 'pull_request' && | |
| ( | |
| github.base_ref == 'v2' || | |
| github.base_ref == 'v2-rebase-main' | |
| ) | |
| ) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| SPEC2_PATH="$(command -v source_spec2 || true)" | |
| if [ -n "$SPEC2_PATH" ]; then | |
| TARGET="$(dirname "$SPEC2_PATH")/source_spec" | |
| # Remove existing target if present | |
| if [ -e "$TARGET" ] || [ -L "$TARGET" ]; then | |
| rm -f "$TARGET" | |
| fi | |
| ln -s "$SPEC2_PATH" "$TARGET" | |
| fi | |
| - name: Clone sourcespec_testruns | |
| run: | | |
| git clone https://github.com/SeismicSource/sourcespec_testruns.git | |
| # TODO: Remove this step when v2 is retired | |
| - name: Patch check_versions.py for v2 branches | |
| if: >- | |
| ( | |
| github.ref == 'refs/heads/v2' || | |
| github.ref == 'refs/heads/v2-rebase-main' | |
| ) || | |
| ( | |
| github.event_name == 'pull_request' && | |
| ( | |
| github.base_ref == 'v2' || | |
| github.base_ref == 'v2-rebase-main' | |
| ) | |
| ) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| sed -i.bak 's/sourcespec/sourcespec2/g' sourcespec_testruns/check_version.py | |
| rm sourcespec_testruns/check_version.py.bak | |
| - name: Do test runs | |
| run: | | |
| bash tests/do_testruns.sh | |
| - name: Collect test artifacts | |
| run: | | |
| bash tests/collect_testrun_artifacts.sh sourcespec_testruns artifacts | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: testruns-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: artifacts | |
| if-no-files-found: ignore |