Skip to content

Commit

Permalink
Add CI workflow (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonagestam committed Oct 2, 2022
1 parent 3851986 commit 0b1853f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = True

[*]
end_of_line = lf
insert_final_newline = True
indent_style = space
indent_size = 4
trim_trailing_whitespace = True

[*.py]
charset = utf-8

[*.{yml,yaml,md,toml}]
indent_size = 2

[Makefile]
indent_style = tab
19 changes: 19 additions & 0 deletions .github/workflows/_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
name: Static analysis
uses: less-action/reusables/.github/workflows/pre-commit.yaml@main
with:
python-version: "3.10"
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.3.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.6.1"
hooks:
- id: editorconfig-checker
alias: ec
args:
- -disable-indent-size
- repo: https://github.com/sirosen/check-jsonschema
rev: "0.18.3"
hooks:
- id: check-github-workflows

0 comments on commit 0b1853f

Please sign in to comment.