Skip to content

Commit

Permalink
Basic config for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AuguB committed Dec 8, 2023
1 parent e9cdf40 commit a713318
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This configuration does the following:

# It triggers the CI pipeline when code is pushed to the master branch.
# It sets up a Python environment, installs project dependencies, and runs pytest.
# Test results are uploaded as artifacts for later examination.

name: CI

on:
push:
branches:
# - master
- test_sanity
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install Dependencies
run: pip install -r requirements.txt

- name: Run Tests with pytest
run: pytest

- name: Upload Test Artifacts
uses: actions/upload-artifact@v2
with:
name: test-results
path: test-reports
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ ssh_error_log.txt
HBR_demo/*
dist/pcntoolkit-0.27-py3.11.egg

# Overrule for github folder
!.github

2 changes: 2 additions & 0 deletions pytest/test_sanity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_sanity():
assert 1 + 1 == 2

0 comments on commit a713318

Please sign in to comment.