Skip to content

Nightly Full AMMR tests #10

Nightly Full AMMR tests

Nightly Full AMMR tests #10

Workflow file for this run

name: Nightly Full AMMR tests
on:
schedule:
- cron: 0 3 * * *
workflow_dispatch: {}
concurrency:
group: ci-nightly-${{ github.ref }}
cancel-in-progress: true
jobs:
test-windows:
if: github.repository == 'anybody/ammr'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ams_version: ["8.0_Beta"]
test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
env:
# Triggers a warning at 20 deg muscles discretization angles
# I.e. wrapping on very small sharp corners
ShortestPathMaxAngle: 0.3491
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: test
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Run full AMMR tests
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pixi run -e test `
pytest -n auto --dist worksteal `
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=20 `
--store-durations --clean-durations `
--runslow
- name: Upload partial durations
uses: actions/upload-artifact@v4
with:
name: test-durations-${{ matrix.test_group }}
path: |
Tests\.test_durations
retention-days: 1
test-linux:
if: github.repository == 'anybody/ammr'
runs-on: ubuntu-latest
container: ghcr.io/anybody/anybodycon-github-actions:${{ matrix.ams_version }}
env:
ANYBODY_SUPPRESS_DEPRECATION_MESSAGES: ${{ fromJSON('{"7.4":"Off","7.5_Beta":"On"}')[matrix.ams_version] }}
strategy:
fail-fast: false
matrix:
ams_version: ["7.4", "8.0_Beta"]
test_group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ fromJSON('{"7.4":"master-ammr-2.4.x","8.0_Beta":"master"}')[matrix.ams_version] }}
- name: Set debug env vars
run: echo ${{ github.event.inputs.debug_config }} >> $GITHUB_ENV
- name: Run tests
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pytest -n auto \
--splits 5 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration \
--only-load \
--runslow
combine-and-upload-timings:
runs-on: ubuntu-latest
needs: [test-windows]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Combine test-durations
run: |
import json, pathlib
data = {}
for file in pathlib.Path.cwd().glob("test-durations-*/*"):
data.update(json.loads(file.read_text()))
data = {k: v for k, v in sorted(data.items(), key=lambda x: x[1], reverse=True)}
test_durations = pathlib.Path('Tests/.test_durations')
if set(data) != set(json.loads(test_durations.read_text())):
test_durations.write_text(json.dumps(data, indent=2))
shell: python
- name: Create updated durations PR
uses: peter-evans/create-pull-request@v6
with:
push-to-fork: anybody-bot/ammr
token: ${{ secrets.DURATIONS_TOKEN }}
branch: update-durations
add-paths: Tests/.test_durations
delete-branch: true
commit-message: Update test durations
author: AnyBody Bot <[email protected]>
committer: AnyBody Bot <[email protected]>
title: 🤖 Update test durations
body: |
The tests suite has changed and I have collected the newest test durations
from yesterdays nightly test. This PR updates the `Tests/.test_durations` file.
[nightly-tests.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/nightly-tests.yml
This PR was created automatically by the [`nightly-tests.yml`][nightly-tests.yml] workflow.