-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from scality/feature/add-developer-tooling
Adding developer tools and checks
- Loading branch information
Showing
8 changed files
with
99 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "Python 3", | ||
"image": "mcr.microsoft.com/devcontainers/python:0-3.10", | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/poetry:2": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/trunk-io/devcontainer-feature/trunk:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["github.vscode-github-actions"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
--- | ||
|
||
name: tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Trunk Check | ||
uses: trunk-io/trunk-action@v1 | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: install poetry | ||
run: pip install poetry | ||
- name: Poetry deps cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/pypoetry" | ||
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Lint project | ||
run: poetry run flake8 | ||
- uses: azure/setup-helm@v1 | ||
with: | ||
version: v2.17.0 | ||
- run: helm lint ./charts/gh-action-exporter | ||
- name: Run tests | ||
run: poetry run pytest --cov=. --cov-report=xml | ||
- name: Upload test coverage | ||
uses: codecov/codecov-action@v2 | ||
if: always() | ||
- uses: actions/checkout@v3 | ||
- name: install poetry | ||
run: pip install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: poetry | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run tests | ||
run: poetry run pytest --cov=. --cov-report=xml | ||
- name: Upload test coverage | ||
uses: codecov/codecov-action@v2 | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*out | ||
*logs | ||
*actions | ||
*notifications | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
shims |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Following source doesn't work in most setups | ||
ignored: | ||
- SC1090 | ||
- SC1091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings] | ||
profile=black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Autoformatter friendly markdownlint config (all formatting rules disabled) | ||
default: true | ||
blank_lines: false | ||
bullet: false | ||
html: false | ||
indentation: false | ||
line_length: false | ||
spaces: false | ||
url: false | ||
whitespace: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
rules: | ||
quoted-strings: | ||
required: only-when-needed | ||
extra-allowed: ["{|}"] | ||
empty-values: | ||
forbid-in-block-mappings: true | ||
forbid-in-flow-mappings: true | ||
key-duplicates: {} | ||
octal-values: | ||
forbid-implicit-octal: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: 0.1 | ||
cli: | ||
version: 1.9.1 | ||
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v0.0.16 | ||
uri: https://github.com/trunk-io/plugins | ||
lint: | ||
enabled: | ||
- actionlint@1.6.24 | ||
- black@23.3.0 | ||
- git-diff-check | ||
- gitleaks@8.16.3 | ||
- hadolint@2.12.0 | ||
- isort@5.12.0 | ||
- markdownlint@0.34.0 | ||
- prettier@2.8.8 | ||
- ruff@0.0.265 | ||
- taplo@0.7.0 | ||
- yamllint@1.31.0 | ||
runtimes: | ||
enabled: | ||
- go@1.19.5 | ||
- node@18.12.1 | ||
- python@3.10.8 |