Skip to content

Commit

Permalink
fix: TOML-aware configuration changes
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Usiskin <[email protected]>
  • Loading branch information
jusiskin committed Dec 17, 2024
1 parent c26590d commit 6b60cf2
Show file tree
Hide file tree
Showing 70 changed files with 2,212 additions and 273 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string

jobs:
Test:
UnitTest:
name: Python
strategy:
matrix:
Expand All @@ -19,4 +19,23 @@ jobs:
uses: aws-deadline/.github/.github/workflows/reusable_python_build.yml@mainline
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
IntegrationTests:
name: Integration Tests - {{ matrix.os }}, python {{ matrix.python-version }}
needs: UnitTest
runs-on: {{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4

- name: Install Hatch
run: |
pip install --upgrade hatch
- name: Run Integration Tests
run: hatch run integ-test
11 changes: 6 additions & 5 deletions .github/workflows/mainline_e2e_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:
workflow_dispatch:

jobs:
WindowsIntegrationTests:
name: Windows Integration Tests
runs-on: windows-latest
IntegrationTests:
name: Integration Tests - {{ matrix.os }}, python {{ matrix.python-version }}
runs-on: {{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
Expand All @@ -21,8 +22,8 @@ jobs:
run: |
pip install --upgrade hatch
- name: Run Windows Integration Tests
run: hatch run windows-integ-test
- name: Run Integration Tests
run: hatch run integ-test

MainlineLinuxE2ECanary:
name: Mainline Linux Canary
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/mainline_e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ on:


jobs:
WindowsIntegrationTests:
name: Windows Integration Tests
runs-on: windows-latest
IntegrationTests:
name: Integration Tests - {{ matrix.os }}, python {{ matrix.python-version }}
runs-on: {{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
Expand All @@ -24,8 +25,8 @@ jobs:
run: |
pip install --upgrade hatch
- name: Run Windows Integration Tests
run: hatch run windows-integ-test
- name: Run Integration Tests
run: hatch run integ-test

MainlineLinuxE2ETest:
name: Linux E2E Test
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ jobs:
with:
branch: mainline

WindowsIntegrationTests:
IntegrationTests:
needs: UnitTests
name: Windows Integration Tests
runs-on: windows-latest
name: Integration Tests - {{ matrix.os }}, python {{ matrix.python-version }}
runs-on: {{ matrix.os }}
permissions:
id-token: write
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
env:
PYTHON: ${{ matrix.python-version }}
Expand All @@ -39,8 +40,8 @@ jobs:
run: |
pip install --upgrade hatch
- name: Run Windows Integration Tests
run: hatch run windows-integ-test
- name: Run Integration Tests
run: hatch run integ-test

LinuxE2ETests:
needs: UnitTests
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
group: windowse2e

Bump:
needs: [LinuxE2ETests, WindowsE2ETests, WindowsIntegrationTests]
needs: [LinuxE2ETests, WindowsE2ETests, IntegrationTests]
name: Version Bump
uses: aws-deadline/.github/.github/workflows/reusable_bump.yml@mainline
secrets: inherit
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release_e2e_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:
workflow_dispatch:

jobs:
WindowsIntegrationTests:
name: Windows Integration Tests
runs-on: windows-latest
IntegrationTests:
name: Integration Tests - {{ matrix.os }}, python {{ matrix.python-version }}
runs-on: {{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
Expand All @@ -21,8 +22,8 @@ jobs:
run: |
pip install --upgrade hatch
- name: Run Windows Integration Tests
run: hatch run windows-integ-test
- name: Run Integration Tests
run: hatch run integ-test

ReleaseLinuxE2ECanary:
name: Release Linux Canary
Expand Down
13 changes: 13 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@ To stop the agent, simply run:
docker exec test_worker_agent /home/agentuser/term_agent.sh
```

### Running Worker Agent Integration Tests

The worker agent has integration tests that run locally on the host machine they are run from.
These tests cover integration with the host operating system and file-system. If you are making
changes that apply to both Windows and Linux, you will need to test your changes on both a Linux
host and a Windows host.

To run the tests, run:

```sh
hatch run integ-test
```

### Running Worker Agent E2E Tests

The worker agent has end-to-end tests that run the agent on ec2 instances with the live Deadline Cloud service. These tests
Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test = "pytest test/unit --numprocesses=auto {args}"
version = "hatch version"
metadata = "hatch project metadata {args:}"
e2e-test= "pytest --no-cov test/e2e {args:}"
windows-integ-test = "pytest --no-cov test/integ/installer {args:}"
integ-test = "pytest --no-cov test/integ {args:}"
typing = "mypy {args:src test}"
style = [
"ruff check {args:.}",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies = [
"openjd-sessions >= 0.9.0,< 0.10",
# tomli became tomllib in standard library in Python 3.11
"tomli == 2.0.* ; python_version<'3.11'",
"tomlkit == 0.13.*",
"typing_extensions ~= 4.8",
"psutil >= 5.9,< 7.0",
"pydantic ~= 1.10.0",
Expand Down
Loading

0 comments on commit 6b60cf2

Please sign in to comment.