Skip to content

Commit

Permalink
Configure Sigrid (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
praseodym authored Jan 14, 2025
1 parent 05b385c commit 0bd46bb
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/sigrid-pr-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Sigrid PR Feedback
on:
pull_request:

jobs:
sigridci:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sigrid CI
uses: Software-Improvement-Group/sigridci@main
with:
customer: kiesraad
system: abacus
convert: rust
env:
SIGRID_CI_TOKEN: "${{ secrets.SIGRID_CI_TOKEN }}"
- name: "Sigrid PR feedback"
uses: mshick/add-pr-comment@v2
if: always()
with:
message-id: sigrid
message-path: sigrid-ci-output/feedback.md
23 changes: 23 additions & 0 deletions .github/workflows/sigrid-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sigrid Publish
on:
push:
branches:
- main

jobs:
sigridci:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sigrid CI
uses: Software-Improvement-Group/sigridci@main
with:
customer: kiesraad
system: abacus
convert: rust
publishonly: true
env:
SIGRID_CI_TOKEN: "${{ secrets.SIGRID_CI_TOKEN }}"
196 changes: 196 additions & 0 deletions sigrid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
partner: "sig"
customer: "kiesraad"
system: "abacus"
repository: "eu-central"
default_excludes: false

components:
# Backend components
- name: "(Backend) Apportionment"
include:
- ".*/backend/src/apportionment/.*"
- name: "(Backend) Authentication"
include:
- ".*/backend/src/authentication/.*"
- name: "(Backend) Data entry"
include:
- ".*/backend/src/data_entry/.*"
- name: "(Backend) EML"
include:
- ".*/backend/src/eml/.*"
- name: "(Backend) Election"
include:
- ".*/backend/src/election/.*"
- name: "(Backend) PDF generation"
include:
- ".*/backend/src/pdf_gen/.*"
- name: "(Backend) Polling station"
include:
- ".*/backend/src/polling_station/.*"
- name: "(Backend) Summary"
include:
- ".*/backend/src/summary/.*"
- name: "(Backend) bin/abacus"
include:
- ".*/backend/src/bin/abacus.rs"
- name: "(Backend) bin/gen-openapi"
include:
- ".*/backend/src/bin/gen-openapi.rs"
- name: "(Backend) error"
include:
- ".*/backend/src/error.rs"
- name: "(Backend) fixtures"
include:
- ".*/backend/src/fixtures.rs"
- name: "(Backend) lib"
include:
- ".*/backend/src/lib.rs"
- name: "(Backend) Integration tests"
include:
- ".*/backend/tests/.*"

# Frontend components
- name: "(Frontend) App Root Files"
include:
- ".*/frontend/app/app.test.ts"
- ".*/frontend/app/main.tsx"
- ".*/frontend/app/msw-mock-api.ts"
- ".*/frontend/app/routes.test.tsx"
- ".*/frontend/app/routes.tsx"
- name: "(Frontend) Components/election"
include:
- ".*/frontend/app/component/election/.*"
- name: "(Frontend) Components/error"
include:
- ".*/frontend/app/component/error/.*"
- name: "(Frontend) Components/footer"
include:
- ".*/frontend/app/component/footer/.*"
- name: "(Frontend) app/component/form/data_entry"
include:
- ".*/frontend/app/component/form/data_entry/.*"
- ".*/frontend/app/component/form/testHelperFunctions.ts"
- ".*/frontend/app/component/form/useWatchForChanges.test.ts"
- ".*/frontend/app/component/form/useWatchForChanges.ts"
- ".*/frontend/app/component/pollingstation/.*"
- name: "(Frontend) app/component/form/polling_station"
include:
- ".*/frontend/app/component/form/polling_station/.*"
- name: "(Frontend) app/component/form/user"
include:
- ".*/frontend/app/component/form/user/.*"
- name: "(Frontend) Components/navbar"
include:
- ".*/frontend/app/component/navbar/.*"

- name: "(Frontend) Modules/Root files"
include:
- ".*/frontend/app/module/AdministratorLayout.tsx"
- ".*/frontend/app/module/DevHomePage.tsx"
- ".*/frontend/app/module/FatalError.tsx"
- ".*/frontend/app/module/NotAvailableInMock.tsx"
- ".*/frontend/app/module/NotFound.tsx"
- ".*/frontend/app/module/RootLayout.tsx"
- name: "(Frontend) Modules/account"
include:
- ".*/frontend/app/module/account/.*"
- name: "(Frontend) Modules/data_entry"
include:
- ".*/frontend/app/module/data_entry/.*"
- name: "(Frontend) Modules/election"
include:
- ".*/frontend/app/module/election/.*"
- name: "(Frontend) Modules/logs"
include:
- ".*/frontend/app/module/logs/.*"
- name: "(Frontend) Modules/polling_stations"
include:
- ".*/frontend/app/module/polling_stations/.*"
- name: "(Frontend) Modules/users"
include:
- ".*/frontend/app/module/users/.*"
- name: "(Frontend) Modules/workstations"
include:
- ".*/frontend/app/module/workstations/.*"

- name: "(Frontend) Lib/API"
include:
- ".*/frontend/lib/api/.*"
- name: "(Frontend) lib/API-Mocks"
include:
- ".*/frontend/lib/api-mocks/.*"
- name: "(Frontend) Lib/i18n"
include:
- ".*/frontend/lib/i18n/.*"
- name: "(Frontend) Unit tests"
include:
- ".*/frontend/lib/test/.*"
- name: "(Frontend) Lib/UI"
include:
- ".*/frontend/lib/ui/.*"
- name: "(Frontend) Lib/Util"
include:
- ".*/frontend/lib/util/.*"

- name: "(Frontend) e2e tests"
include:
- ".*/frontend/e2e-tests/.*"
- name: "(Frontend) Scripts"
include:
- ".*/frontend/scripts/.*"

languages:
- name: "css"
- name: "javascript"
- name: "sqlite"
production:
include:
- ".*/migrations/.*[.]sql"
exclude:
- ".*/fixtures/.*[.]sql"
test:
generated:

- name: "rust"
production:
include:
- ".*/gen-openapi.rs"
- ".*/api.rs"
test:
generated:
include:
- ".*/gen/.*[.]rs"

- name: "typescript"
production:
test:
include:
- ".*NotAvailableInMock[.]tsx"
- ".*/lib/api-mocks/.*[.]ts"
- ".*/lib/api-mocks/.*[.]tsx"
- ".*[.]e2e[.]ts"
- ".*.stories[.]tsx"
generated:
include:
- ".*/gen/.*[.]ts"


exclude:
- ".*/backend/[.]sqlx/.*"
- ".*/frontend/app/component/MockTest[.]tsx"
- ".*/frontend/lib/icon/.*"
- ".*/[.]ladle.*"
- ".*[.]d[.]ts"
- ".*[.]config[.]ts"

dependencychecker:
blocklist:
- "backend"
transitive: true

architecture:
enabled: true
custom_components: true

thirdpartyfindings:
enabled: true

0 comments on commit 0bd46bb

Please sign in to comment.