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

Add Stan to CI #114

Merged
merged 1 commit into from
Nov 1, 2023
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
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