Skip to content

Commit

Permalink
Merge pull request #114 from commercialhaskell/stam
Browse files Browse the repository at this point in the history
Add Stan to CI
  • Loading branch information
mpilgrem authored Nov 1, 2023
2 parents 711448a + fddc632 commit bba0c97
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/stan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Apply stan

on:
pull_request:
workflow_dispatch:

jobs:
build:
name: Apply stan
runs-on: ubuntu-latest

steps:
- name: Clone project
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}

- name: Install stan
run: |
git clone https://github.com/kowainik/stan.git
cd stan
stack --local-bin-path ../.bin install
cd ..
- name: Generate .hie for analysis
run: stack build pantry:lib

- name: Run stan
run: .bin/stan report --cabal-file-path=pantry.cabal

- name: Upload HTML report
uses: actions/upload-artifact@v3
with:
name: Stan_report
path: stan.html
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
resolver: stack-ghc-9.6.3.yaml
steps:
- name: Clone project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- stack-ghc-9.4.7.yaml
steps:
- name: Clone project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .stan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# Anti-pattern: Data.ByteString.Char8.pack
[[ignore]]
id = "OBS-STAN-0203-RDkR59-110:17"
id = "OBS-STAN-0203-RDkR59-114:17"
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
# ✦ Category: #AntiPattern
# ✦ File: src/Hackage\Security\Client\Repository\HttpLib\HttpClient.hs
Expand All @@ -43,7 +43,7 @@

# Anti-pattern: Slow 'length' for Text
[[ignore]]
id = "OBS-STAN-0208-gkCCTP-1100:14"
id = "OBS-STAN-0208-gkCCTP-1150:14"
# ✦ Description: Usage of 'length' for 'Text' that runs in linear time
# ✦ Category: #AntiPattern
# ✦ File: src/Pantry.hs
Expand Down

0 comments on commit bba0c97

Please sign in to comment.