Slack interactivity to handle observation plan manual trigger #83
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: Run Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Extract Python version from pyproject.toml | |
| id: get-python-version | |
| run: | | |
| PYTHON_VERSION=$(grep '^requires-python' pyproject.toml | grep -oP '[0-9]+\.[0-9]+') | |
| echo "Python version found: $PYTHON_VERSION" | |
| echo "python-version=$PYTHON_VERSION" >> $GITHUB_OUTPUT | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ steps.get-python-version.outputs.python-version }} | |
| - name: Install PDM | |
| run: | | |
| pip install pdm | |
| pdm config python.use_venv true | |
| - name: Install project dependencies | |
| run: pdm install -G test | |
| - name: Run tests | |
| run: pdm run test | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml |