️BUILD - 2023 EuroSciPy (pull_request) #122
This file contains 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: "2023 EuroSciPy 🇨🇭 Continuous Integration Demo" | |
run-name: "️BUILD - 2023 EuroSciPy (${{ github.event_name }})" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
# Use Bash shell with 'errexit' option to exit immediately if any command fails. | |
shell: bash -e {0} | |
jobs: | |
changes: | |
name: 🔄 Check out changes | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
permissions: | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
if: github.ref == 'refs/heads/main' # Only checkout when the branch is 'main' | |
- name: Check for backend file changes | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #v3.0.2 | |
id: changes | |
with: | |
filters: | | |
changes: | |
- "2023_EuroSciPy/**/*.py" | |
- "2023_EuroSciPy/**/*.ipynb" | |
- "2023_EuroSciPy/requirements.txt" | |
build: | |
name: 🏗️ Build with Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
needs: changes | |
if: needs.changes.outputs.changes == 'true' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ "3.12" ] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
sparse-checkout: 2023_EuroSciPy | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install 2023_EuroSciPy | |
run: | | |
cd 2023_EuroSciPy | |
python -m pip install --upgrade pip | |
python -m pip install ".[dev]" | |
- name: Run tests | |
run: | |
pytest 2023_EuroSciPy |