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

test: Added github action CI tests #1

Merged
merged 7 commits into from
Jul 24, 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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
55 changes: 55 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: test

on:
pull_request:
branches: [ main]
schedule:
# Runs at 00:00, only on Sunday
- cron: '0 0 * * 0'
workflow_dispatch:



concurrency:
group: ci-test-${{ github.ref }}
cancel-in-progress: true





jobs:
test1:
if: ${{ !github.event.pull_request.head.repo.fork && github.repository == 'anybody/seated-human-mannequin-driver' }}
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
path: applicaiton

- name: Checkout AMMR
uses: actions/checkout@v4
with:
repository: AnyBody/ammr
ref: master
path: ammr

- name: Link AMMR
shell: cmd
run: |
echo #include "%GITHUB_WORKSPACE%/ammr/libdef.any" > libdef.any

- uses: prefix-dev/[email protected]
with:
manifest-path: applicaiton/pixi.toml
activate-environment: true
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

- name: Run test
run: pytest applicaiton/Model
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_TEST_SERVER_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_TEST_SERVER }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pixi environments
.pixi
*.egg-info
8 changes: 8 additions & 0 deletions Model/test_model.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "../SeatedHuman.main.any"


Main = {

AnyOperation& RunTest = RunApplication;

};
12 changes: 9 additions & 3 deletions SeatedHuman.main.any
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "../libdef.any"

/** The Seated Human is a family of models resulting from a
/* The Seated Human is a family of models resulting from a
research project involving the furniture industry. This
model is a human sitting in a generic chair where the seat,
backrest, arm rests, foot rest and head rest can be adjusted
Expand All @@ -16,6 +14,14 @@ friction but no tension. The available friction is proportional
to the normal force and the user can supply a friction
coefficient for each surface such that the effect of different
surface fabrics can be investigated.*/

#ifpathexists "../libdef.any"
#include "../libdef.any"
#else
#include "<ANYBODY_PATH_INSTALLDIR>/AMMR/libdef.any"
#endif


Main = {
// ----------------------------------------------------------
// Model parameters: Driver position and support settings
Expand Down
Loading