Skip to content

Commit

Permalink
Try another way to fix github actions on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed May 6, 2021
1 parent a889469 commit 46ffdb2
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 227 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/ci.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: cardano-launcher Windows Tests

on: [push]

jobs:
tests:
runs-on: windows-2016
name: Run tests on Windows
steps:
- uses: actions/checkout@v2

- name: 'Configure cardano-wallet source'
shell: powershell
run: |
$sources = (Get-Content "nix/sources.json" -Raw) | ConvertFrom-Json | Select -expand "cardano-wallet" | Select owner, repo, rev
Write-Output $sources
echo "REPO_OWNER=$($sources.owner)" >> $Env:GITHUB_ENV
echo "REPO_NAME=$($sources.repo)" >> $Env:GITHUB_ENV
echo "COMMIT=$($sources.rev)" >> $Env:GITHUB_ENV
- name: 'Wait for Hydra build'
uses: rvl/hydra-build-products-action@master
id: hydra
with:
hydra: 'https://hydra.iohk.io'
jobs: 'cardano-wallet-win64'
timeout-minutes: 45

- name: Fetch cardano-wallet
shell: powershell
run: |
echo "Build product URLs: ${{ steps.hydra.outputs.buildProducts }}"
"${{ steps.hydra.outputs.buildProducts }}".Split(" ") | ForEach {
$url = $_
$output = $url.Split("/")[-1]
Invoke-WebRequest -Uri $url -OutFile $output
}
Expand-Archive -Force -Path "cardano-wallet-v20*win64.zip" -DestinationPath .
Expand-Archive -Force -Path "cardano-wallet-*-deployments.zip" -DestinationPath deployments
Get-ChildItem
echo "CARDANO_NODE_CONFIGS=$Env:GITHUB_WORKSPACE\deployments" >> $Env:GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 10
- run: npm install
id: install
- run: npm test unit
id: unit
timeout-minutes: 5
if: '${{ always() }}'
- run: npm test integration
id: integration
timeout-minutes: 5
if: '${{ always() }}'
- run: npm test cli
id: cli
timeout-minutes: 5
if: '${{ always() }}'

- name: Test results
if: always()
shell: powershell
run: |
echo "unit test outcome: $Env:unit"
echo "integration test outcome: $Env:integration"
echo "cli test outcome: $Env:cli"
env:
unit: ${{ steps.unit.outcome }}
integration: ${{ steps.integration.outcome }}
cli: ${{ steps.cli.outcome }}
199 changes: 0 additions & 199 deletions scripts/download-hydra.js

This file was deleted.

0 comments on commit 46ffdb2

Please sign in to comment.