Try more steps
This commit is contained in:
parent
c9f6358254
commit
ad0dafa841
1 changed files with 69 additions and 13 deletions
|
|
@ -16,46 +16,102 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node.js (for actions)
|
- name: Install Node.js (for actions)
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
apt-get install -y nodejs
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check versions
|
- name: Check versions
|
||||||
run: |
|
run: |
|
||||||
ghc --version
|
ghc --version
|
||||||
cabal --version
|
cabal --version
|
||||||
|
node --version
|
||||||
- name: Cache Cabal packages
|
- name: Cache Cabal packages
|
||||||
uses: https://github.com/actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cabal/packages
|
~/.cabal/packages
|
||||||
~/.cabal/store
|
~/.cabal/store
|
||||||
dist-newstyle
|
dist-newstyle
|
||||||
key: ${{ runner.os }}-stackage-lts22-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
|
key: ${{ runner.os }}-haskell-9.10-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stackage-lts22-cabal-
|
${{ runner.os }}-haskell-9.10-cabal-
|
||||||
|
|
||||||
- name: Update Cabal package index
|
- name: Update Cabal package index
|
||||||
run: cabal update
|
run: cabal update
|
||||||
|
|
||||||
- name: Configure project
|
- name: Configure project
|
||||||
run: cabal configure --enable-tests --enable-benchmarks
|
run: cabal configure --enable-tests --enable-benchmarks
|
||||||
|
|
||||||
- name: Build dependencies
|
- name: Build dependencies
|
||||||
run: cabal build --only-dependencies --enable-tests --enable-benchmarks
|
run: cabal build --only-dependencies --enable-tests --enable-benchmarks
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: cabal build --enable-tests --enable-benchmarks
|
run: cabal build --enable-tests --enable-benchmarks
|
||||||
|
|
||||||
- name: Run documentation build
|
- name: Run documentation build
|
||||||
run: cabal haddock
|
run: cabal haddock
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: haskell:9.10
|
||||||
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Node.js (for actions)
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Cache Cabal packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cabal/packages
|
||||||
|
~/.cabal/store
|
||||||
|
dist-newstyle
|
||||||
|
key: ${{ runner.os }}-haskell-9.10-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-haskell-9.10-cabal-
|
||||||
|
- name: Update Cabal package index
|
||||||
|
run: cabal update
|
||||||
|
- name: Configure project
|
||||||
|
run: cabal configure --enable-tests --enable-benchmarks
|
||||||
|
- name: Build dependencies
|
||||||
|
run: cabal build --only-dependencies --enable-tests --enable-benchmarks
|
||||||
|
- name: Build project
|
||||||
|
run: cabal build --enable-tests --enable-benchmarks
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cabal test --test-show-details=direct
|
run: cabal test --test-show-details=direct
|
||||||
|
|
||||||
|
fourmolu:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: haskell:9.10
|
||||||
|
steps:
|
||||||
|
- name: Install Node.js (for actions)
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install fourmolu
|
||||||
|
run: cabal install fourmolu-0.18.0.0
|
||||||
|
- name: Run fourmolu
|
||||||
|
run: |
|
||||||
|
find src test app -name "*.hs" -exec fourmolu --check-idempotence {} \; 2>/dev/null || true
|
||||||
|
find src test app -name "*.hs" -exec fourmolu --mode check {} \;
|
||||||
|
|
||||||
|
hlint:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: haskell:9.10
|
||||||
|
steps:
|
||||||
|
- name: Install Node.js (for actions)
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install hlint
|
||||||
|
run: cabal install hlint-3.8
|
||||||
|
- name: Run hlint
|
||||||
|
run: |
|
||||||
|
if [ -d src ]; then hlint src/; fi
|
||||||
|
if [ -d test ]; then hlint test/; fi
|
||||||
|
if [ -d app ]; then hlint app/; fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue