Skip to content

Fixes #38909 - Use syslog gem not in windows #19

Fixes #38909 - Use syslog gem not in windows

Fixes #38909 - Use syslog gem not in windows #19

Workflow file for this run

---
name: Foreman Proxy on Windows
on:
pull_request:
push:
branches:
- 'develop'
- '*-stable'
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
bundle-smart-proxy:
runs-on: windows-latest
defaults:
run:
shell: pwsh
strategy:
matrix:
rubyversion: ['3.3', '3.4']
proxytag: ['3.16.1']
steps:
- name: Determine tag to fetch
id: tag
run: |
$ErrorActionPreference = 'Stop'
$repo = 'theforeman/smart-proxy'
if ('${{ github.event.inputs.version }}') {
$tag = '${{ github.event.inputs.version }}'
} else {
$tag = '${{ matrix.proxytag }}'
}
"tag=$tag" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Set up Ruby (Windows)
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.rubyversion }}
bundler-cache: false
- name: Install Bundler
run: |
gem install bundler --no-document
- name: Print debug info
shell: pwsh
run: |
$repo = 'theforeman/smart-proxy'
$tag = '${{ steps.tag.outputs.tag }}'
$zip = "$env:RUNNER_TEMP\smart-proxy-$tag.zip"
$url = "https://github.com/$repo/archive/refs/tags/$tag.zip"
Write-Host "Repo: $repo"
Write-Host "Tag: $tag"
Write-Host "URL: $url"
Write-Host "ZIP: $zip"
- name: Download release source ZIP
run: |
$repo = 'theforeman/smart-proxy'
$tag = '${{ steps.tag.outputs.tag }}'
$zip = "$env:RUNNER_TEMP\smart-proxy-$tag.zip"
$url = "https://github.com/$repo/archive/refs/tags/$tag.zip"
Invoke-WebRequest -Uri $url -OutFile $zip
Expand-Archive -Path $zip -DestinationPath $env:RUNNER_TEMP -Force
# Move to a stable path
$extracted = Get-ChildItem "$env:RUNNER_TEMP\smart-proxy-*" -Directory | Select-Object -First 1
Move-Item $extracted.FullName "$env:GITHUB_WORKSPACE\smart-proxy"
- name: Show Ruby env (sanity)
working-directory: smart-proxy
run: |
ruby -v
gem -v
ridk version
- name: Bundle install smart-proxy
working-directory: smart-proxy
run: |
bundle add rake --group development
bundle config set path vendor/bundle
bundle config set without 'test krb5 libvirt'
bundle install --jobs 4
- name: Rake sanity
working-directory: smart-proxy
run: |
bundle exec rake -T
- name: Run tests
working-directory: smart-proxy
run: |
bundle exec rake test