From 23773ef271f424dce900f5055e7a97647acd8276 Mon Sep 17 00:00:00 2001 From: "Daniel M. Faes" Date: Wed, 10 Apr 2024 18:08:40 -0600 Subject: [PATCH] workflow test --- .github/workflows/main.yaml | 33 +++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 18 ------------------ 2 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/main.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..6ee904b --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,33 @@ +name: Run tests + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + # This is the version of the action for setting up Python, not the Python version. + uses: actions/setup-python@v4 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '3.10' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + # You can test your matrix by printing the current Python version + - name: Install dependencies + run: | + python -c "import sys; print(sys.version)" + python -m pip install --upgrade pip + pip install -r requirements.txt + python setup.py install + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b0625f6..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -stages: - - test - -pytest: - stage: test - image: - name: python:3.10 - before_script: - - 'echo $PATH' - - 'pip install -U pip' - - 'pip install -r requirements.txt' - - 'python3 setup.py install' - script: - - pytest --junitxml=report.xml - artifacts: - when: always - reports: - junit: report.xml