updated pythong version and made consistent across file #1108
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Linux test | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create LFS file list | |
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id | |
- name: LFS Cache | |
uses: actions/cache@v3 | |
with: | |
path: .git/lfs/objects | |
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} | |
restore-keys: | | |
${{ runner.os }}-lfs- | |
- name: Git LFS Pull | |
run: git lfs pull | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniforge-variant: Mambaforge | |
channels: conda-forge # defaults automatically added | |
python-version: ${{ matrix.python-version }} | |
activate-environment: geofabrics | |
environment-file: environment_linux.yml | |
use-mamba: true | |
auto-activate-base: false | |
- name: Install test dependencies | |
run: | | |
mamba install flake8 pytest | |
- name: Create .env file with API keys | |
env: | |
ENV_BASE64: ${{ secrets.ENV_BASE64 }} | |
run: | | |
echo import .env file from secrets and regenerate the file | |
echo $ENV_BASE64 | base64 -d > .env | |
- name: Run lint with flake8 | |
run: | | |
# 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: Run tests with pytest | |
run: | | |
pytest |