Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogma-cli: Introduce CI test job. Refs #139. #140

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/repo-ghc-8.6-cabal-2.4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: install-hackage-ghc-8.6-cabal-2.4

# Trigger the workflow on push or pull request
on:
- pull_request
- push

jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
cabal: ["2.4"]
ghc:
- "8.6"

steps:

- uses: haskell-actions/setup@main
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Prepare environment
run: |
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
echo "$HOME/.cabal/bin" >> $GITHUB_PATH

- uses: actions/checkout@v4

- name: Create sandbox
run: |
echo "$PWD/.cabal-sandbox/bin" >> $GITHUB_PATH
cabal v1-sandbox init

- name: Install dependencies
run: |
cabal v1-install alex happy

- name: Install ogma
run: |
# Some tests need the ogma executable to be in the path, which won't
# happen until installation completes successfully (which only happens
# after tests if running tests is enabled). We therefore need to run
# the installation twice: once without --run-tests, and again with
# --run-tests.
#
# We still --enable-tests in the first compilation to make sure that
# the dependencies do not change and cabal does not change the
# installation plan (which would mean we'd be running the tests with a
# version of ogma compiled with different dependencies).
cabal v1-install ogma-**/ --enable-tests

- name: Test all packages
run: |
# We want to document the build process, and get detailed information
# if there is a problem (or if all goes well). We therefore execute the
# installation with -j1.
cabal v1-install ogma-**/ --enable-tests --run-tests -j1
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions ogma-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Revision history for ogma-cli

## [1.X.X] - 2024-05-19
* Introduce CI test job (#139).

## [1.3.0] - 2024-03-21

* Version bump 1.3.0 (#133).
Expand Down