Skip to content

Update main.yaml with login shell and github env instead of source #2

Update main.yaml with login shell and github env instead of source

Update main.yaml with login shell and github env instead of source #2

Workflow file for this run

name: Python application
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
container: python:3.8
steps:
- uses: actions/checkout@v3
- name: Install black
run: pip install black
- name: Run black
run: black --check .
testcov:
runs-on: ubuntu-latest
container: python:3.8
steps:
- uses: actions/checkout@v3
- name: Install dependencies
shell: bash -l {0}
run: |
apt-get update && apt-get install -y libgl1
wget -q https://repo.continuum.io/miniconda/Miniconda3-py38_23.11.0-1-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -f -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda env create -q -f ./env/face_detection_age_from-history.yaml -n myenv --yes
conda init bash
echo "conda activate myenv" >> $GITHUB_ENV
pip install pytest pytest-cov
- name: Run pytest-cov
run: pytest . --cov --disable-pytest-warnings
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}