Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added integration test workflow #13

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/actions/test-integration/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Test Unit
description: Check unit tests
inputs:
python-version:
description: "Python version"
required: true
os:
description: "Operating system"
required: true
report_job:
description: "Job name to update by JUnit report"
required: true

runs:
using: "composite"
steps:
- name: Install package
uses: ./.github/actions/install-package
with:
python-version: ${{ inputs.python-version }}
os: ${{ inputs.os }}-latest

- name: Test
run: |
pytest -v -n 2 ./tests/integration/ \
--timeout=120 --timeout_method=thread \
--color=yes \
--junitxml="./test-results/test-integration-${{ inputs.os }}-${{ inputs.python-version }}.xml"
shell: bash

- name: Upload test reports
uses: actions/upload-artifact@v3
if: always()
with:
name: test-artifacts
path: ./test-results

- name: Report
uses: mikepenz/[email protected]
if: always()
with:
report_paths: './test-results/test-integration-*.xml'
update_check: true
include_passed: true
annotate_notice: true
job_name: ${{ inputs.report_job }}
39 changes: 39 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: integration

on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
test:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.12"]
os: [ubuntu, windows]
include:
- python-version: "3.7.16"
os: macos
- python-version: "3.12"
os: macos

name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Run tests
uses: ./.github/actions/test-integration
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
report_job: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
3 changes: 3 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ behave
mock
pre-commit
pytest
pytest-mock
pytest-timeout
pytest-xdist
icecream
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pattern = "default-unprefixed"
python = "^3.7"

# Base neptune package
neptune = "*"
neptune = "2.0.0a0"

# Optional for default progress update handling
tqdm = { version = ">=4.66.0", optional = true }
Expand Down
Loading