Skip to content

Commit

Permalink
Remove unnecessary argument + add to main tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Sep 11, 2021
1 parent 81e54ea commit 9b693e6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v2

- name: Run tests
run: swift test -v --enable-test-discovery
run: swift test -v

test-macos:
runs-on: macos-latest
Expand All @@ -22,3 +22,39 @@ jobs:

- name: Run tests
run: swift test -v --enable-code-coverage

# originally from: https://github.com/compnerd/swift-build/blob/master/.github/workflows/swift-argument-parser.yml
test-windows:
runs-on: windows-latest

strategy:
matrix:
include:
- tag: 5.4.3-RELEASE
branch: swift-5.4.3-release

steps:
- uses: actions/checkout@v2

- name: Install Swift ${{ matrix.tag }}
run: |
function Update-EnvironmentVariables {
foreach ($level in "Machine", "User") {
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
# For Path variables, append the new values, if they're not already in there
if ($_.Name -Match 'Path$') {
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -Split ';' | Select -Unique) -Join ';'
}
$_
} | Set-Content -Path { "Env:$($_.Name)" }
}
}
Install-Binary -Url "https://swift.org/builds/${{ matrix.branch }}/windows10/swift-${{ matrix.tag }}/swift-${{ matrix.tag }}-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
Update-EnvironmentVariables
# Reset Path and environment
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
Get-ChildItem Env: | % { echo "$($_.Name)=$($_.Value)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append }
- name: Run tests
run: swift test -v
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v2

- name: Run tests
run: swift test -v --enable-test-discovery
run: swift test -v

test-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -78,4 +78,4 @@ jobs:
Get-ChildItem Env: | % { echo "$($_.Name)=$($_.Value)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append }
- name: Run tests
run: swift test -v --enable-test-discovery
run: swift test -v

0 comments on commit 9b693e6

Please sign in to comment.