Switch to unified view

a b/.github/workflows/test-self-hosted.yml
1
name: Tests (self hosted)
2
3
on:
4
  pull_request:
5
  workflow_dispatch:
6
    inputs:
7
      use-custom-anybodycon:
8
          type: boolean
9
          description: 'Use a custom version of AnyBody from AMS build system.'
10
          default: false
11
      custom-anybodycon-name:
12
          description: 'Name of the custom AnyBody version to use. (E.g. path on the I:\ drive)'
13
          required: false
14
          default: 'AnyBody.8.1-CI-master.AnyBody.8.1.x/AnyBodyCon.exe'
15
      custom-pytest-arg:
16
          description: 'Specify which test to run. E.g. `Tests/test_example.any`. Default is entire test suite.'
17
          required: false
18
          default: ''
19
20
concurrency: 
21
  group: test-self-hosted-${{ github.ref }}
22
  cancel-in-progress: true
23
24
jobs:
25
  test:
26
    # Run all private AMMR forks on self-hosted runners
27
    if: ${{ (github.event_name == 'workflow_dispatch')  || (github.repository_owner == 'anybody' && github.repository != 'anybody/ammr') }}
28
29
    strategy:
30
      fail-fast: false
31
      matrix:
32
        test_group: [1, 2, 3, 4, 5]
33
34
    env:
35
      # Triggers a warning at 20 deg
36
      ShortestPathMaxAngle: 0.3491
37
 
38
39
    runs-on: [self-hosted, Windows, AnyBody]
40
    
41
    steps:
42
      - uses: actions/checkout@v4
43
        
44
      - uses: prefix-dev/setup-pixi@v0.8.7
45
        with:
46
          environments: test
47
          pixi-bin-path: ${{ runner.temp }}\Scripts\pixi.exe
48
          cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
49
          activate-environment: test
50
51
52
      - name: Patch with custom version
53
        if: inputs.use-custom-anybodycon
54
        uses: ./.github/actions/custom-anybodycon
55
        with:
56
          custom-anybodycon: ${{ inputs.custom-anybodycon-name }}
57
          connection-string:  ${{ secrets.AZURE_CONN_STR }}
58
          target-path: .pixi/envs/test/bin/AnyBodyConCustom.exe
59
60
      - name: Set custom AnyBodyCon environment variable
61
        if: inputs.use-custom-anybodycon
62
        run: |
63
          echo "ANYBODYCON=.pixi/envs/test/bin/AnyBodyConCustom.exe" >> $GITHUB_ENV
64
65
      - name: Run AMMR tests
66
        run: |
67
          cd Tests
68
          pytest -n 5 --dist worksteal `
69
            --splits 5 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
70
            --durations=10 `
71
            --anybodycon="$Env:ANYBODYCON" `
72
            --runslow `
73
          ${{ github.event.inputs.custom-pytest-arg  || '' }}