Skip to content

Run tests on pull requets and pushes to main #55

Run tests on pull requets and pushes to main

Run tests on pull requets and pushes to main #55

Workflow file for this run

name: Run Linting and Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
curl -L https://git.io/get_helm.sh | bash && sudo mv `which helm` `which helm`2
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
python -m pip install .
python -m pip install -r testing_reqs.txt
- name: Lint with black and helm lint
run: |
python3 -m black -S -l 80 --check .
helm2 lint --strict helmchart/ngshare
helm lint --strict helmchart/ngshare
- name: Test with pytest
run: |
python3 -m pytest ./ngshare/ --cov=./ngshare/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: false
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true