Skip to content

fix: add missing slug parameter #10

fix: add missing slug parameter

fix: add missing slug parameter #10

Workflow file for this run

name: Main
on: [push]
jobs:
check_coverage:
permissions:
contents: write
runs-on: ${{ github.repository_owner == 'EpitechPromo2027' && 'self-hosted' || 'ubuntu-latest' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache GHCup
uses: actions/cache@v4
id: ghcup-cache
with:
path: /home/runner/.ghcup
key: ${{ runner.os }}-ghcup-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ runner.os }}-ghcup-
- name: Cache Cabal
uses: actions/cache@v4
id: cabal-cache
with:
path: /home/runner/.cabal
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ runner.os }}-cabal-
- name: Install required packages
run: sudo apt update && sudo apt install -y build-essential libffi-dev libgmp-dev zlib1g-dev
- name: Setup Haskell
if: ${{ steps.cabal-cache.outputs.cache-hit != 'true' && steps.ghcup-cache.outputs.cache-hit != 'true' }}
uses: ./external/haskell-setup
with:
ghc-version: 9.4.8
cabal-version: 3.10.3.0
- name: Install dependencies
if: ${{ steps.cabal-cache.outputs.cache-hit != 'true' }}
run: |
cabal update
cabal install hspec-discover hpc-codecov --overwrite-policy=always
- name: Setup environment
if: ${{ steps.cabal-cache.outputs.cache-hit == 'true' && steps.ghcup-cache.outputs.cache-hit == 'true' }}
run: |
echo "/home/runner/.cabal/bin" >> $GITHUB_PATH
echo "/home/runner/.ghcup/bin" >> $GITHUB_PATH
# This is disabled for the moment since EPITECH CI runners are not powerful enough to build the project
- name: Build project
run: cabal build --jobs=1
- name: Test project
run: |
cabal configure --enable-coverage --disable-library-coverage
cabal test --jobs=1
- name: Generate coverage report
run: |
hpc-codecov cabal:glados-test --exclude Main,Paths_glados --out codecov.json --format codecov --verbose
- name: Send coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
- name: Generate Haddock documentation
id: generate-docs
if: github.ref == 'refs/heads/main'
run: |
cabal haddock --haddock-html --haddock-hyperlink-source
DOCS_DIR=$(find dist-newstyle/build -type d -path "*/doc/html/*" | head -n 1)
echo "::notice::Haddock documentation generated at: $DOCS_DIR"
- name: Deploy Haddock to GitHub Pages
uses: ./external/actions-gh-pages
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ steps.generate-docs.outputs.DOCS_DIR }}