Skip to content

Commit b4418af

Browse files
committed
Squashed commit of the following:
commit 2f7bdf5 Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 20:12:07 2025 -0400 Fix workflow typo commit f88cb13 Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 20:11:30 2025 -0400 Compose workflow for testing on branch commit 4d88e8a Author: Spencer H <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 20:01:48 2025 -0400 Remove old mds commit 88c8c9b Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 19:55:34 2025 -0400 Add name to workflow commit 624442d Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:42:37 2025 -0400 Add run to actions commit 4134d5e Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:40:16 2025 -0400 Fix action dir struction commit 946f258 Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:36:13 2025 -0400 Fix job line in workflow commit 81ec658 Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:34:07 2025 -0400 Changed to github actions commit d7b69d6 Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:18:36 2025 -0400 Add needs command commit a338076 Author: Spencer H <spencer.hallyburton@duke.edu> Date: Tue Apr 15 15:11:42 2025 -0400 Update test workflow commit a4d954d Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 13:21:23 2025 -0400 Update paths for workflow commit 4201b57 Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 13:20:05 2025 -0400 Update paths for workflow commit 714ef53 Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 13:17:17 2025 -0400 Update paths for workflow commit af07237 Author: Spencer Hallyburton <20426598+roshambo919@users.noreply.github.com> Date: Tue Apr 15 13:15:33 2025 -0400 Tests of new git workflows
1 parent ced3416 commit b4418af

8 files changed

Lines changed: 133 additions & 112 deletions

File tree

.github/actions/install/action.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Install
2+
description: Installs poetry and the poetry environment as an action
3+
4+
inputs:
5+
python-version:
6+
description: Version of python to use
7+
required: true
8+
default: 3.10
9+
poetry-version:
10+
description: Version of poetry to install
11+
required: true
12+
default: 1.6.1
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
22+
- name: Set up Python ${{ inputs.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ inputs.python-version }}
26+
27+
- name: Set up Poetry ${{ inputs.poetry-version }}
28+
uses: abatilo/actions-poetry@v2.0.0
29+
with:
30+
poetry-version: ${{ inputs.poetry-version }}
31+
32+
- name: Set up cache
33+
uses: actions/cache@v3
34+
id: cache
35+
with:
36+
path: .venv
37+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
38+
39+
- name: Ensure cache is healthy
40+
if: steps.cache.outputs.cache-hit == 'true'
41+
shell: bash
42+
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
43+
44+
- name: Install dependencies
45+
shell: bash
46+
run: |
47+
poetry install -E percep

.github/actions/test/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
description: Run unit tests for this repository
3+
4+
inputs:
5+
test-folder:
6+
description: Location of the folder to test
7+
required: false
8+
default: tests
9+
10+
runs:
11+
using: composite
12+
steps:
13+
# - name: Lint with flake8
14+
# run: |
15+
# # stop the build if there are Python syntax errors or undefined names
16+
# poetry run flake8 ./avstack --count --max-line-length=127 --show-source --statistics
17+
- name: Run tests
18+
shell: bash
19+
run: |
20+
poetry run pytest ${{ inputs.test-folder }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run tests on some branch
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
branch:
7+
required: true
8+
type: string
9+
os:
10+
default: ubuntu-22.04
11+
type: string
12+
13+
jobs:
14+
build_and_test:
15+
name: Run unit tests on ${{ inputs.branch }} branch
16+
17+
runs-on: ${{ inputs.os }}
18+
19+
strategy:
20+
matrix:
21+
python-version: [ "3.10" ]
22+
poetry-version: [ "1.6.1" ]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install environment
28+
uses: ./.github/actions/install
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
poetry-version: ${{ matrix.poetry-version }}
32+
33+
- name: Run unit tests
34+
uses: ./.github/actions/test
35+
with:
36+
test-folder: tests

.github/workflows/test_on_main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Run tests on main branch
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
call_tester:
11+
name: Run unit tests on main branch
12+
uses: ./.github/workflows/test_on_branch.yml
13+
with:
14+
branch: main
15+
os: ubuntu-22.04
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Run tests on workflows branch
2+
3+
on:
4+
push:
5+
branches: [ workflows ]
6+
pull_request:
7+
branches: [ workflows ]
8+
9+
jobs:
10+
call_tester:
11+
name: Run unit tests on workflows branch
12+
uses: ./.github/workflows/test_on_branch.yml
13+
with:
14+
branch: workflows
15+
os: ubuntu-22.04

.github/workflows/tests.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)