Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows runners #298

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/test-cache-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'test-cache-windows'
on:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-setup-cache:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v4
- name: Setup with cache
uses: ./
with:
enable-cache: true
working-directory: __tests__\fixtures\rye-project
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }}
- run: rye sync
working-directory: __tests__\fixtures\rye-project
test-restore-cache:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
needs: test-setup-cache
steps:
- uses: actions/checkout@v4
- name: Restore with cache
id: restore
uses: ./
with:
enable-cache: true
working-directory: __tests__\fixtures\rye-project
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache was hit
run: |
if ($env:CACHE_HIT -ne "true") {
exit 1
}
env:
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
- run: rye sync
working-directory: __tests__\fixtures\rye-project
49 changes: 49 additions & 0 deletions .github/workflows/test-latest-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'test-latest-windows'
on:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Should not be on path
run: |
if (!(Get-Command -Name "rye" -ErrorAction SilentlyContinue)) {
exit 0
} else {
exit 1
}
- name: Setup rye
uses: ./
with:
version: latest
working-directory: __tests__\fixtures\rye-project
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: rye sync
working-directory: __tests__\fixtures\rye-project
- name: Rye path is not added to .profile
run: |
$env:Path -split ';' | ForEach-Object {
if ($_ -eq "C:\path\to\rye") {
exit 1
}
}
exit 0
test-latest-without-github-token:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup rye
uses: ./
with:
version: latest
- run: rye sync
working-directory: __tests__\fixtures\rye-project
2 changes: 0 additions & 2 deletions .github/workflows/test-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Loading