Files
xmonad-contrib/.github/workflows/tests.yml
Tomas Janousek 42771e4658 ci: Run tests (stack) workflow in all branches
Consistency with haskell-ci (cabal) workflow. It's nice to see the
results before opening a PR so that one doesn't need to embarrass
themselves.
2021-01-25 22:34:28 +00:00

53 lines
1.3 KiB
YAML

name: Tests
on:
pull_request:
push:
jobs:
build:
name: CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
resolver:
- nightly
- lts-17
- lts-16
- lts-15
- lts-14
- lts-12
yaml: ['stack.yaml', 'stack-master.yaml']
steps:
- name: Clone project
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-${{ hashFiles('xmonad-contrib.cabal') }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.yaml) }}-
${{ runner.os }}-${{ matrix.resolver }}-
- name: Install dependencies
run: |
set -ex
sudo apt install -y \
libasound2-dev \
libgmp-dev \
libtinfo-dev \
libx11-dev \
libxft-dev \
libxrandr-dev \
libxss-dev \
#
- name: Build and run tests
run: |
set -ex
stack --stack-yaml=${{ matrix.yaml }} test --fast --no-terminal --resolver=${{ matrix.resolver }}