Skip to content

Commit

Permalink
Merge pull request #1 from AnyBody/add-test
Browse files Browse the repository at this point in the history
test: Added github action CI tests
  • Loading branch information
melund authored Jul 24, 2024
2 parents a47dd00 + a846608 commit 67b335b
Show file tree
Hide file tree
Showing 7 changed files with 994 additions and 3 deletions.
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

0 comments on commit 67b335b

Please sign in to comment.