Merge pull request #18 from VolpeUSDOT/RDR_2024_2_1 #111
Workflow file for this run
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: Python_package | |
on: [push, pull_request] | |
jobs: | |
condabuild: | |
name: Build with conda (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "windows-latest" ] | |
python-version: [ "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Conda dependencies | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: RDRenv | |
environment-file: environment.yml | |
- name: Conda info | |
shell: bash -l {0} | |
run: conda info | |
- name: Conda list | |
shell: pwsh | |
run: conda list | |
- name: Install testing dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
- name: Lint with flake8 | |
run: | | |
# Provide warnings but do not stop the build | |
# if there are Python syntax errors or undefined names | |
flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Run tests | |
run: | | |
conda activate RDRenv | |
pytest |