fix typo in script name and make it update the relevant info files #98
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CACHE_NUMBER: 0 # increase to reset cache manually | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| miniforge-version: latest | |
| activate-environment: wmin-model-dev | |
| use-mamba: true | |
| - name: Cache Conda packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/conda_pkgs_dir | |
| key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci_environment.yml') }} | |
| - name: Update environment | |
| run: | | |
| mamba env update -n wmin-model-dev -f ci_environment.yml | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Install dependencies | |
| run: | | |
| source $(conda info --base)/etc/profile.d/conda.sh # Initialize Conda | |
| conda activate wmin-model-dev | |
| python -m pip install --upgrade pip | |
| - name: Install colibri private repository | |
| run: | | |
| source $(conda info --base)/etc/profile.d/conda.sh # Initialize Conda | |
| conda activate wmin-model-dev | |
| pip install git+https://${{ secrets.WMIN_TOKEN }}@github.com/HEP-PBSP/colibri.git | |
| - name: Lint with flake8 | |
| shell: bash -l {0} | |
| run: | | |
| source $(conda info --base)/etc/profile.d/conda.sh # Initialize Conda | |
| conda activate wmin-model-dev | |
| pip install flake8 | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --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: Test with pytest | |
| shell: bash -l {0} | |
| run: | | |
| source $(conda info --base)/etc/profile.d/conda.sh # Initialize Conda | |
| conda activate wmin-model-dev | |
| pip install pytest pytest-cov | |
| pytest -p no:warnings wmin/tests --cov --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.2.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |