Bibliography API and listing functionality #1225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# trigger the workflow on push or pull request, but only for the master branch | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Git user identity for chronicle/timetravel tests | |
run: | | |
git config --global user.name "Test Name" | |
git config --global user.email "[email protected]" | |
- name: Install Haskell and install+test the module | |
uses: freckle/stack-action@v5 | |
with: | |
stack-arguments: --coverage | |
# prepare and upload test coverage report | |
- name: Create codecov coverage report | |
uses: 8c6794b6/hpc-codecov-action@v4 | |
with: | |
target: stack:poseidon-tools-tests | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # set in organization settings | |
# render and deploy haddock documentation | |
- name: Render haddock documentation | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
stack haddock \ | |
--no-haddock-deps \ | |
--fast | |
- name: Get path to haddock documentation | |
id: haddockpath | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
docpathgeneral=`stack path --local-install-root`/doc | |
echo $docpathgeneral | |
docpath=`find $docpathgeneral -type d -name "poseidon-hs*" -printf '%T+ %p\n' | sort -r | head -n 1 | cut -d' ' -f2` | |
echo $docpath | |
echo "DOCPATH=$docpath" >> $GITHUB_OUTPUT | |
- name: Deploy haddock documentation | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{ steps.haddockpath.outputs.DOCPATH }} |