Skip to content

Commit 3c9fd62

Browse files
authored
Merge pull request #5329 from commercialhaskell/nightly-tests-on-actions
Move integration tests to Github Actions
2 parents d263757 + 452c91f commit 3c9fd62

File tree

5 files changed

+67
-250
lines changed

5 files changed

+67
-250
lines changed

.azure/azure-nightly-template-linux.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.azure/azure-nightly-template-osx.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.azure/azure-nightly-template-windows.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Integration tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master, stable]
7+
schedule:
8+
- cron: "0 0 * * *"
9+
10+
jobs:
11+
integration-tests:
12+
name: Integration tests
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
release-args: "--alpine"
20+
- os: windows-latest
21+
release-args: ""
22+
- os: macos-latest
23+
release-args: ""
24+
steps:
25+
- name: Clone project
26+
uses: actions/checkout@v2
27+
- name: Cache dependencies
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.stack
31+
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
32+
- shell: bash
33+
name: Install deps and run checks
34+
run: |
35+
set -ex
36+
37+
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
38+
39+
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
40+
then
41+
# Retry installing nix due to nondeterministic error
42+
# Fatal error: glibc detected an invalid stdio handle
43+
# See:
44+
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
45+
# https://github.com/NixOS/nix/issues/2733
46+
(for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) && exit 0; done; exit 1)
47+
. ~/.nix-profile/etc/profile.d/nix.sh
48+
nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
49+
nix-channel --update # Get GHC 8.2.2
50+
elif [[ "${{ matrix.os }}" == "windows-latest" ]]
51+
then
52+
choco install nsis-unicode -y
53+
fi
54+
55+
# Do this in the same step as installing deps to get relevant env var modifications
56+
stack etc/scripts/release.hs check ${{ matrix.release-args }}
57+
58+
set +ex
59+
60+
- shell: bash
61+
name: Build bindist
62+
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
63+
64+
- uses: actions/upload-artifact@v1
65+
with:
66+
name: ${{ runner.os }}
67+
path: _release

azure-nightly-pipeline.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)