Skip to content

Commit

Permalink
Add basic setup for github actions
Browse files Browse the repository at this point in the history
Remove travis.yml and add elements to gitignore
  • Loading branch information
Alexander Mejia committed Mar 31, 2023
1 parent 0728fad commit 474a7ba
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 121 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# The present workflow was made based on the following references:
# - https://github.com/stackbuilders/hapistrano/blob/master/.github/workflows/build.yml
---
name: build

on: push

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
haskell:
strategy:
matrix:
ghc:
- "8.10"
- "8.4.3"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Haskell tooling
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "3.6"
- name: Configure project
run: cabal configure --enable-tests
- name: Build project
run: cabal build
- name: Run tests
run: cabal test --test-show-details=direct
- name: Check documentation
run: cabal haddock
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# The present workflow was made based on the following references:
# - https://github.com/tfausak/strive/blob/main/.github/workflows/ci.yaml
# - https://hackage.haskell.org/upload
---
name: Release

on:
release:
types:
- published

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

jobs:
cabal-upload:
uses: stackbuilders/reusable-workflows/.github/workflows/cabal-upload.yml@main
with:
ghc_version: "8.10"
cabal_version: "3.6"
ignore_uploaded_package: true
secrets:
HACKAGE_USERNAME: ${{ secrets.HACKAGE_USERNAME }}
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }}
24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
.stack-work/
dist
dist-*
cabal-dev
*.o
*.hi
*.hie
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*
120 changes: 0 additions & 120 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions atomic-write.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ test-suite atomic-write-test
, bytestring >= 0.10.4
, hspec

build-tools: hspec-discover >= 2.0 && < 3.0

default-language: Haskell2010
ghc-options: -Wall

Expand Down

0 comments on commit 474a7ba

Please sign in to comment.