Skip to content

Commit

Permalink
Merge pull request #6 from kuisathaverat/fix/lint
Browse files Browse the repository at this point in the history
fix: add Python requirement before lint
  • Loading branch information
kuisathaverat authored Feb 16, 2024
2 parents 698fbbd + 44a7fac commit fe016d1
Show file tree
Hide file tree
Showing 13 changed files with 550 additions and 219 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
## continous deployment workflow
## continuous deployment workflow
name: cd

on:
Expand All @@ -17,6 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: false
ref: ${{ github.sha || 'main' }}
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Lint
run: make lint
build:
Expand Down Expand Up @@ -57,4 +66,3 @@ jobs:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
## continous integration workflow
## continuous integration workflow
name: ci

on:
Expand All @@ -18,6 +18,11 @@ jobs:
fetch-depth: 0
fetch-tags: false
ref: ${{ github.sha || 'main' }}
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Lint
run: make lint
build:
Expand All @@ -43,4 +48,3 @@ jobs:
with:
name: test-results
path: "**/junit-*.xml"

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__init__.py
.gradle
.idea
.venv
Expand All @@ -11,3 +10,8 @@ gha-creds-*.json
release.properties
target
venv
pytest_otel.egg-info
junit-test_*.xml
.mypy_cache
.pytest_cache
tests/tests.json
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
exclude: (.+.bat$|.+.ps1$|^target/)
- id: check-json
- id: check-merge-conflict
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-xml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/detailyang/pre-commit-shell.git
rev: master
hooks:
- id: shell-lint
name: "Shellscript: lint"
stages: [commit]
types: [shell]

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.25.0
hooks:
- id: yamllint
name: "Yaml: lint"
args: ['-c','.yamlint.yml']
stages: [commit]
types: [yaml]
exclude: (^.pre-commit-config.yaml$|^.pre-commit-hooks.yaml$)

- repo: https://github.com/elastic/apm-pipeline-library.git
rev: current
hooks:
- id: check-bash-syntax
- id: check-abstract-classes-and-trait # TODO: this hook won't be needed once the CI migration is completed
- id: check-jsonslurper-class # TODO: this hook won't be needed once the CI migration is completed
- id: check-unicode-non-breaking-spaces
- id: remove-unicode-non-breaking-spaces
- id: check-en-dashes
- id: remove-en-dashes

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ['--ignore-words-list','pullrequest,pullrequests']
10 changes: 10 additions & 0 deletions .yamlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends: default

rules:
# 120 chars should be enough, but don't fail if a line is longer
line-length:
max: 120
level: warning

indentation:
level: warning
202 changes: 0 additions & 202 deletions LICENSE.txt

This file was deleted.

4 changes: 2 additions & 2 deletions docs/demos/jaeger/config/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ receivers:
grpc:

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed
jaeger:
endpoint: jaeger-all-in-one:14250
tls:
Expand Down
4 changes: 2 additions & 2 deletions docs/demos/jaeger/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: '3.7'
services:
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
image: jaegertracing/all-in-one:1.46.0
ports:
- "16686:16686"
- "14268"
Expand All @@ -13,7 +13,7 @@ services:
- pytest_otel

otel-collector:
image: otel/opentelemetry-collector-contrib-dev:latest
image: otel/opentelemetry-collector-contrib:0.94.0
command: ["--config=/etc/otel-collector-config.yaml", "${OTELCOL_ARGS}"]
healthcheck:
interval: 10s
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = pytest_otel
description = pytest-otel report OpenTelemetry traces about test executed
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/elastic/apm-pipeline-library/tree/main/resources/scripts/pytest_otel
url = https://github.com/kuisathaverat/pytest_otel
maintainer = Ivan Fernandez Calvo
version = 1.4.0
version = 1.4.1
license = Apache-2.0
license_file = LICENSE.txt
platforms = any
Expand All @@ -27,8 +27,8 @@ classifiers =
Topic :: Utilities
keywords = pytest, otel, opentelemetry, debug
project_urls =
Source=https://github.com/elastic/apm-pipeline-library/tree/main/resources/scripts/pytest_otel
Tracker=https://github.com/elastic/apm-pipeline-library/issues
Source=https://github.com/kuisathaverat/pytest_otel
Tracker=https://github.com/kuisathaverat/pytest_otel/issues

[options]
packages = find:
Expand Down
Loading

0 comments on commit fe016d1

Please sign in to comment.