Skip to content

Commit c0fdac5

Browse files
committed
Merge remote-tracking branch 'remimimimimi/pixi-build-testsuite/feat/filtered-for-merge' into feat/testsuite
2 parents e6cf8b2 + 7e550c2 commit c0fdac5

File tree

281 files changed

+39063
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+39063
-0
lines changed

testsuite/.dprint.jsonc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"yaml": {
3+
"printWidth": 100,
4+
"formatComments": true,
5+
"braceSpacing": false,
6+
},
7+
"excludes": [ "**/*-lock.json", "**/*.lock", "**/node_modules/", "dist/" ],
8+
"plugins": [
9+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
10+
],
11+
}

testsuite/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

testsuite/.github/actionlint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
self-hosted-runner:
2+
labels:
3+
- 8core_ubuntu_latest_runner
4+
- 16core_windows_latest_runner
5+
- windows_arm64_2025_large
6+
- windows_x64_2025_large

testsuite/.github/workflows/CI.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
pull_request:
9+
types:
10+
- labeled
11+
- synchronize
12+
- opened
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
env:
19+
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
20+
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
21+
PYTEST_ADDOPTS: "--color=yes"
22+
PYTHONIOENCODING: utf-8
23+
24+
jobs:
25+
test-linux-x86_64:
26+
timeout-minutes: 10
27+
name: Build test Linux x86_64
28+
runs-on: 8core_ubuntu_latest_runner
29+
steps:
30+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
31+
32+
- name: Set up pixi
33+
uses: prefix-dev/setup-pixi@main
34+
with:
35+
cache: true
36+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
37+
38+
- name: Download artifacts
39+
run: pixi run download-artifacts
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Run integration tests
44+
run: pixi run --locked test-slow
45+
46+
test-windows-x86_64:
47+
timeout-minutes: 10
48+
name: Build test Windows x86_64
49+
runs-on: windows-latest
50+
steps:
51+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
52+
53+
- name: Create Dev Drive
54+
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
55+
56+
- name: Copy Git Repo to Dev Drive
57+
run: Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PIXI_WORKSPACE }}" -Recurse
58+
59+
- name: Set up pixi
60+
uses: prefix-dev/setup-pixi@main
61+
with:
62+
manifest-path: ${{ env.PIXI_WORKSPACE }}/pixi.toml
63+
cache: true
64+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
65+
66+
- name: Download artifacts
67+
working-directory: ${{ env.PIXI_WORKSPACE }}
68+
run: pixi run download-artifacts
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- name: Run integration tests
73+
run: pixi run --locked test-slow
74+
working-directory: ${{ env.PIXI_WORKSPACE }}
75+
76+
test-macos-aarch64:
77+
timeout-minutes: 10
78+
name: Build test macOS aarch64
79+
runs-on: macos-14
80+
steps:
81+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
82+
83+
- name: Set up pixi
84+
uses: prefix-dev/setup-pixi@main
85+
with:
86+
cache: true
87+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
88+
89+
- name: Download artifacts
90+
run: pixi run download-artifacts
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
94+
- name: Run integration tests
95+
run: pixi run --locked test-slow
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
6+
name: Security
7+
8+
jobs:
9+
ensure-pinned-actions:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
14+
- name: Ensure SHA pinned actions
15+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@9e9574ef04ea69da568d6249bd69539ccc704e74 # v4
16+
with:
17+
allowlist: |
18+
prefix-dev/
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
pull_request:
9+
types:
10+
- labeled
11+
- synchronize
12+
- opened
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
lint:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
23+
- name: Set up pixi
24+
uses: prefix-dev/setup-pixi@main
25+
with:
26+
environments: lint
27+
- name: lint (if this step fails, please 'pixi run lint' locally and push the changes)
28+
run: pixi run lint
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Prevent Branch Override Merge
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
check-branch-override:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
12+
13+
- name: Set up pixi
14+
uses: prefix-dev/setup-pixi@main
15+
16+
- name: Check for branch override files
17+
run: pixi run check-branch-override
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Configures a drive for testing in CI.
2+
# Credits to astral-sh/uv: https://github.com/astral-sh/uv/blob/d2b9ffdc9e3f336e46b0af18a8554de560bfbefc/.github/workflows/setup-dev-drive.ps1
3+
4+
# When not using a GitHub Actions "larger runner", the `D:` drive is present and
5+
# has similar or better performance characteristics than a ReFS dev drive.
6+
# Sometimes using a larger runner is still more performant (e.g., when running
7+
# the test suite) and we need to create a dev drive. This script automatically
8+
# configures the appropriate drive.
9+
if (Test-Path "D:\") {
10+
Write-Output "Using existing drive at D:"
11+
$Drive = "D:"
12+
} else {
13+
# The size (20 GB) is chosen empirically to be large enough for our
14+
# workflows; larger drives can take longer to set up.
15+
$Volume = New-VHD -Path C:\pixi_dev_drive.vhdx -SizeBytes 20GB |
16+
Mount-VHD -Passthru |
17+
Initialize-Disk -Passthru |
18+
New-Partition -AssignDriveLetter -UseMaximumSize |
19+
Format-Volume -DevDrive -Confirm:$false -Force
20+
21+
$Drive = "$($Volume.DriveLetter):"
22+
23+
# Set the drive as trusted
24+
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-designate-a-dev-drive-as-trusted
25+
fsutil devdrv trust $Drive
26+
27+
# Disable antivirus filtering on dev drives
28+
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-configure-additional-filters-on-dev-drive
29+
fsutil devdrv enable /disallowAv
30+
31+
# Remount so the changes take effect
32+
Dismount-VHD -Path C:\pixi_dev_drive.vhdx
33+
Mount-VHD -Path C:\pixi_dev_drive.vhdx
34+
35+
# Show some debug information
36+
Write-Output $Volume
37+
fsutil devdrv query $Drive
38+
39+
Write-Output "Using Dev Drive at $Volume"
40+
}
41+
42+
$Tmp = "$($Drive)\pixi-tmp"
43+
44+
# Create the directory ahead of time in an attempt to avoid race-conditions
45+
New-Item $Tmp -ItemType Directory
46+
47+
# Move Cargo to the dev drive
48+
New-Item -Path "$($Drive)\.cargo\bin" -ItemType Directory -Force
49+
if (Test-Path "C:\Users\runneradmin\.cargo") {
50+
Copy-Item -Path "C:\Users\runneradmin\.cargo\*" -Destination "$($Drive)\.cargo\" -Recurse -Force
51+
}
52+
53+
Write-Output `
54+
"DEV_DRIVE=$($Drive)" `
55+
"TMP=$($Tmp)" `
56+
"TEMP=$($Tmp)" `
57+
"RATTLER_CACHE_DIR=$($Drive)\rattler-cache" `
58+
"RUSTUP_HOME=$($Drive)\.rustup" `
59+
"CARGO_HOME=$($Drive)\.cargo" `
60+
"PIXI_HOME=$($Drive)\.pixi" `
61+
"PIXI_WORKSPACE=$($Drive)\pixi" `
62+
>> $env:GITHUB_ENV

testsuite/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
target
2+
.idea
3+
.vscode
4+
.test-projects
5+
__pycache__
6+
.pixi
7+
.build
8+
.DS_store
9+
site/
10+
.cache
11+
pytest-temp
12+
/vendor
13+
.env
14+
artifacts
15+
*.local.*
16+
AGENTS.md
17+
files.txt

testsuite/.ruff.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
line-length = 100
2+
lint.fixable = ["I"]
3+
4+
[format]
5+
indent-style = "space"
6+
quote-style = "double"

0 commit comments

Comments
 (0)