Add CI build cache

This commit is contained in:
Alexander Krupenkin 2020-10-21 10:24:15 +03:00
parent bbb32ddf5c
commit 37f6a0649c
No known key found for this signature in database
GPG Key ID: 8858C018FBC3725E
3 changed files with 42 additions and 17 deletions

41
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Main
on:
pull_request: {}
push:
branches:
- master
- rc/*
jobs:
Tests:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup latest stack
uses: actions/setup-haskell@v1
with:
enable-stack: true
stack-version: 'latest'
- name: Cache .stack-root
uses: actions/cache@v1
env:
cache-name: stack-root
with:
path: .stack-root
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('stack.yaml') }}
- name: Test
shell: bash
run: |
set -ex
export STACK_ROOT=$(pwd)/.stack-root
stack test --haddock --no-haddock-deps

View File

@ -1,16 +0,0 @@
on: [push]
name: Testing
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
name: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
enable-stack: true
stack-version: 'latest'
- run: stack test

View File

@ -4,7 +4,7 @@ Web3 API for Haskell
This library implements Haskell API client for popular Web3 platforms.
[![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest)
[![Testing](https://github.com/airalab/hs-web3/workflows/Testing/badge.svg)](https://github.com/airalab/hs-web3/actions)
[![CI](https://github.com/airalab/hs-web3/workflows/Main/badge.svg)](https://github.com/airalab/hs-web3/actions)
[![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3)
[![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3)
[![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3)