Skip to content

Commit 2b741c3

Browse files
committed
Test windows test
1 parent 26d48a1 commit 2b741c3

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.github/workflows/windows.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
name: Foreman Proxy on Windows
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- 'develop'
9+
- '*-stable'
10+
11+
env:
12+
BUNDLE_WITHOUT: "development"
13+
14+
concurrency:
15+
group: ${{ github.ref_name }}-${{ github.workflow }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
bundle-smart-proxy:
20+
runs-on: windows-latest
21+
defaults:
22+
run:
23+
shell: pwsh
24+
strategy:
25+
matrix:
26+
rubyversion: ['3.3', '3.4']
27+
proxytag: ['3.16.1']
28+
29+
steps:
30+
- name: Determine tag to fetch
31+
id: tag
32+
run: |
33+
$ErrorActionPreference = 'Stop'
34+
$repo = 'theforeman/smart-proxy'
35+
36+
if ('${{ github.event.inputs.version }}') {
37+
$tag = '${{ github.event.inputs.version }}'
38+
} else {
39+
$tag = '${{ matrix.proxytag }}'
40+
}
41+
"tag=$tag" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
42+
43+
- name: Set up Ruby (Windows)
44+
uses: ruby/setup-ruby@v1
45+
with:
46+
ruby-version: ${{ matrix.rubyversion }}
47+
bundler-cache: false
48+
49+
- name: Install Bundler
50+
run: |
51+
gem install bundler --no-document
52+
53+
- name: Print debug info
54+
shell: pwsh
55+
run: |
56+
$repo = 'theforeman/smart-proxy'
57+
$tag = '${{ steps.tag.outputs.tag }}'
58+
$zip = "$env:RUNNER_TEMP\smart-proxy-$tag.zip"
59+
$url = "https://github.com/$repo/archive/refs/tags/$tag.zip"
60+
Write-Host "Repo: $repo"
61+
Write-Host "Tag: $tag"
62+
Write-Host "URL: $url"
63+
Write-Host "ZIP: $zip"
64+
65+
- name: Download release source ZIP
66+
run: |
67+
$repo = 'theforeman/smart-proxy'
68+
$tag = '${{ steps.tag.outputs.tag }}'
69+
$zip = "$env:RUNNER_TEMP\smart-proxy-$tag.zip"
70+
$url = "https://github.com/$repo/archive/refs/tags/$tag.zip"
71+
Invoke-WebRequest -Uri $url -OutFile $zip
72+
Expand-Archive -Path $zip -DestinationPath $env:RUNNER_TEMP -Force
73+
# Move to a stable path
74+
$extracted = Get-ChildItem "$env:RUNNER_TEMP\smart-proxy-*" -Directory | Select-Object -First 1
75+
Move-Item $extracted.FullName "$env:GITHUB_WORKSPACE\smart-proxy"
76+
77+
- name: Show Ruby env (sanity)
78+
working-directory: smart-proxy
79+
run: |
80+
ruby -v
81+
gem -v
82+
ridk version
83+
84+
- name: Bundle install smart-proxy
85+
working-directory: smart-proxy
86+
run: |
87+
# Optional: keep gems in repo-local path
88+
bundle config set path vendor/bundle
89+
bundle config set without 'development test krb5 libvirt'
90+
bundle install --jobs 4
91+
92+
# Optional: quick smoke (does it parse & list rake tasks?)
93+
- name: Rake sanity
94+
working-directory: smart-proxy
95+
run: |
96+
bundle exec rake -T

0 commit comments

Comments
 (0)