Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/will-roscoe/nbody
Browse files Browse the repository at this point in the history
  • Loading branch information
will-roscoe committed Dec 12, 2023
2 parents 2699529 + e43f269 commit 96a8dcb
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 32 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
core: ['**/core/*.py']
documentation: ['**/doc*']
tests: ['**/tests/*test*.py']
tools: ['**/tools/*.py']
26 changes: 26 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v4
with:
configuration-path: .github/labeler.yml
enable-versioned-regex: 0
include-title: 1
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: 1
41 changes: 41 additions & 0 deletions .github/workflows/pytest-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

name: 'pytest: base'
on:
workflow_run:
workflows: CI (Ingest) - Ruff
workflow_dispatch:

jobs:
build-tests:
name: Pytest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
cache: pip
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
pip install -r requirements.txt
- name: Pytest run
run: |
pytest -v --disable-warnings -l **/tests/test_base.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Upload pytest results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}-base
path: junit/test-results-${{ matrix.python-version }}-base.xml
if: ${{ always() }}





32 changes: 0 additions & 32 deletions .github/workflows/pytest-ci.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/ruff-ci-ingest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

name: CI (Ingest) - Ruff
on:
push:
branches: [ "main" ]
paths:
- 'nbody/**.py'
- '*.py'
workflow_dispatch:
jobs:
build-linter:
name: Ruff
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
cache: pip
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pip install ruff
ruff --output-format=github .
continue-on-error: true

0 comments on commit 96a8dcb

Please sign in to comment.