Skip to content

Add 3.8 to tests

Add 3.8 to tests #1164

Workflow file for this run

name: FAIR Data Pipeline CLI
on: [push, workflow_dispatch]
jobs:
test:
name: Test ${{ matrix.os }} (Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest] #, macos-latest]
python: ["3.8", "3.9", "3.10", "3.11", "3.x"]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
if: ${{ runner.os != 'Windows' }}
- name: Checkout to C windows
run: |
mkdir C:/FAIR-CLI
git clone https://github.com/FAIRDataPipeline/FAIR-CLI.git C:/FAIR-CLI
cd C:/FAIR-CLI
git checkout $GITHUB_REF_NAME
echo Github Ref: $GITHUB_REF_NAME
if: ${{ runner.os == 'Windows' }}
shell: bash
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: "x64"
- name: Install Poetry
run: python -m pip install poetry
- name: Install Module
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cd C:/FAIR-CLI
pwd
fi
python -m poetry install
shell: bash
- name: Install Python API for API Tests
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cd C:/FAIR-CLI
pwd
fi
python -m poetry run pip install git+https://github.com/FAIRDataPipeline/pyDataPipeline.git@main
shell: bash
- name: Run Tests for Each Marker
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cd C:/FAIR-CLI
pwd
fi
for marker in $(poetry run pytest --markers | grep -oE "faircli_[a-zA-Z|_|0-9]+")
do
echo "Running tests for marker '$marker'"
python -m poetry run pytest -m $marker --cov=fair --cov-report=xml --cov-report=term --cov-append -s tests/
exit_code=$?
if [ "$exit_code" != "0" ]; then
echo "ERROR: Tests for marker '$marker' failed"
fi
done
shell: bash
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false
verbose: true