mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-12-27 22:12:30 +03:00
Merge branch 'master' into add_working_directory
This commit is contained in:
commit
ad763c6dc3
67
.github/workflows/build-and-test.yml
vendored
Normal file
67
.github/workflows/build-and-test.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Build and Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
matrix:
|
||||
ghc: ["8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.3", "8.10.1"]
|
||||
os: [ubuntu-latest]
|
||||
include:
|
||||
- os: macos-latest
|
||||
ghc: "8.10.1"
|
||||
- os: ubuntu-16.04
|
||||
ghc: "7.10.3"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Zsh
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install zsh
|
||||
else
|
||||
brew update
|
||||
brew install zsh
|
||||
fi
|
||||
- uses: haskell/actions/setup@v1
|
||||
id: setup-haskell-cabal
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
cabal-version: "3.4"
|
||||
- run: cabal update
|
||||
- run: cabal freeze --enable-tests
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
||||
dist-newstyle
|
||||
key: dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
|
||||
restore-keys: |
|
||||
dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
|
||||
dependencies-${{ runner.os }}-${{ matrix.ghc }}-
|
||||
- name: Compile dependencies
|
||||
run: cabal build --only-dependencies
|
||||
- name: Compile project
|
||||
run: cabal build --enable-tests
|
||||
- run: cabal test --enable-tests
|
||||
- run: cabal haddock | grep "100%" | wc -l | grep -G "[45]" # Fixes issue with different haddock coverage with different ghc versions https://github.com/haskell/haddock/issues/123
|
||||
- run: cabal sdist
|
||||
- if: matrix.ghc == '8.0.2'
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- if: matrix.ghc == '8.0.2'
|
||||
name: Dockerize
|
||||
run: |
|
||||
docker build . -t hapistrano
|
||||
docker run --rm hapistrano --version
|
54
.travis.yml
54
.travis.yml
@ -1,54 +0,0 @@
|
||||
language: c
|
||||
|
||||
sudo: false
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- ~/.ghc
|
||||
- ~/.cabal
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: CABALVER=3.4 GHCVER=7.10.3
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-7.10.3,zsh],sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.0.2
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.0.2,zsh], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.2.2
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.2.2,zsh], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.4.4
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.4.4,zsh], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.6.5
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.6.5,zsh], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.8.3
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.8.3,zsh], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=3.4 GHCVER=8.10.1
|
||||
addons: {apt: {packages: [cabal-install-3.4,ghc-8.10.1,zsh], sources: [hvr-ghc]}}
|
||||
- os: osx
|
||||
osx_image: xcode12
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ghc cabal-install zsh; fi
|
||||
|
||||
install:
|
||||
- zsh --version
|
||||
- cabal --version
|
||||
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||
- travis_retry cabal update
|
||||
|
||||
script:
|
||||
- cabal build --enable-tests
|
||||
- cabal test --enable-tests
|
||||
- cabal sdist
|
||||
- cabal haddock | grep "100%" | wc -l | grep -G "[45]" # Fixes issue with different haddock coverage with different ghc versions https://github.com/haskell/haddock/issues/123
|
||||
# There is a single Docker image, there are no variants for different versions of GHC
|
||||
# Due to some rate limits we are turning this off since we need to modify the
|
||||
# build script in order to run docker login first. See
|
||||
# https://www.docker.com/increase-rate-limits
|
||||
# - if [[ "$GHCVER" == "8.0.2" ]]; then docker build . -t hapistrano; docker run --rm hapistrano --version; fi
|
||||
|
||||
notifications:
|
||||
email: false
|
@ -1,4 +1,4 @@
|
||||
[![Build Status](https://travis-ci.org/stackbuilders/hapistrano.svg?branch=master)](https://travis-ci.org/stackbuilders/hapistrano)
|
||||
[![Build and Test](https://github.com/stackbuilders/hapistrano/actions/workflows/build-and-test.yml/badge.svg?branch=master)](https://github.com/stackbuilders/hapistrano/actions/workflows/build-and-test.yml)
|
||||
[![Hackage version](https://img.shields.io/hackage/v/hapistrano.svg)](http://hackage.haskell.org/package/hapistrano)
|
||||
[![Docker Hub](https://img.shields.io/docker/build/stackbuilders/hapistrano.svg?style=flat)](https://hub.docker.com/r/stackbuilders/hapistrano)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user