generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters