Skip to content

added tests

added tests #1

Workflow file for this run

name: Pull requests tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run linting
run: |
pre-commit run -a
- name: Test with pytest
run: |
pytest -n auto -v --capture=sys -x --tb=long --junitxml=/tmp/test-results/openstack-peepo-exporter-unittests.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: openstack-peepo-exporter-unittests
path: /tmp/test-results/openstack-peepo-exporter-unittests.xml