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

Feature/add GitHub actions per tool #45

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 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
17 changes: 17 additions & 0 deletions .github/workflows/checkqc_lint.yml
ellendejong marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CheckQC Lint
on:
pull_request:
paths: [CheckQC/**]
push:
branches: [master, develop]
ellendejong marked this conversation as resolved.
Show resolved Hide resolved
paths: [CheckQC/**]

jobs:
ruff:
runs-on: ubuntu-latest
defaults:
run:
working-directory: CheckQC/
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
63 changes: 63 additions & 0 deletions .github/workflows/checkqc_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Source: https://github.com/marketplace/actions/install-poetry-action
name: CheckQC Test
on:
pull_request:
paths: [CheckQC/**]
push:
branches: [master, develop]
paths: [CheckQC/**]

jobs:
pytest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: CheckQC/
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11.5'
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv_checkqc-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install root project
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest .
17 changes: 17 additions & 0 deletions .github/workflows/gendercheck_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: GenderCheck Lint
on:
pull_request:
paths: [GenderCheck/**]
push:
branches: [master, develop]
paths: [GenderCheck/**]

jobs:
ruff:
runs-on: ubuntu-latest
defaults:
run:
working-directory: GenderCheck/
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
63 changes: 63 additions & 0 deletions .github/workflows/gendercheck_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Source: https://github.com/marketplace/actions/install-poetry-action
name: GenderCheck Test
on:
pull_request:
paths: [GenderCheck/**]
push:
branches: [master, develop]
paths: [GenderCheck/**]

jobs:
pytest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: GenderCheck/
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11.5'
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv_gendercheck-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install root project
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest .
17 changes: 17 additions & 0 deletions .github/workflows/moisaichunter_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: MosaicHunter Lint
on:
pull_request:
paths: [MosaicHunter/**]
push:
branches: [master, develop]
paths: [MosaicHunter/**]

jobs:
ruff:
runs-on: ubuntu-latest
defaults:
run:
working-directory: MosaicHunter/1.0.0//
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
63 changes: 63 additions & 0 deletions .github/workflows/moisaichunter_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Source: https://github.com/marketplace/actions/install-poetry-action
name: MosaicHunter Test
on:
pull_request:
paths: [MosaicHunter/**]
push:
branches: [master, develop]
paths: [MosaicHunter/**]

jobs:
pytest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: MosaicHunter/1.0.0/
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11.5'
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv_mosaichunter-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install root project
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest .
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.1
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
Loading