Skip to content

Commit d0b9550

Browse files
committed
Test windows test
1 parent 26d48a1 commit d0b9550

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

.github/workflows/windows.yml

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

0 commit comments

Comments
 (0)