Skip to content

Commit

Permalink
GitHub Actions + small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspatzke committed Apr 10, 2022
1 parent 4834233 commit dc6edd8
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 388 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release to PyPI
on:
release:
types: [published]
push:
tags:
- v*.*.*

jobs:
build-and-publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1
- name: Verify versioning
run: |
[ "$(poetry version -s)" == "${GITHUB_REF#refs/tags/v}" ]
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
- name: Build packages
run: poetry build
- name: Configure Poetry
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }}
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
- name: Publish to test PyPI
if: ${{ github.event_name == 'push' }}
run: poetry publish -r testpypi
- name: Publish to PyPI
if: ${{ github.event_name == 'release' }}
run: poetry publish
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
test:
strategy:
matrix:
os: [ 'ubuntu-20.04' ]
python-version: [ '3.8', '3.9', '3.10' ]
poetry-version: [ '1.1' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest --cov=sigma --cov-report term --cov-report xml:cov.xml -vv
- name: Store coverage for badge
if: ${{ runner.os == 'Linux' }}
run: poetry run python print-coverage.py >> $GITHUB_ENV
- name: Create coverage badge
if: ${{ github.repository == 'SigmaHQ/pySigma-pipeline-windows ' && github.event_name == 'push' && runner.os == 'Linux' }}
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 143d6c718b5bbc9fb7c0e33ed06b0f85
filename: SigmaHQ-pySigma-pipeline-windows.json
label: Coverage
message: ${{ env.COVERAGE }}
color: ${{ env.COVERAGE_COLOR }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.coverage*
.vscode/
**/__pycache__
cov.xml
dist/
docs/_build
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Tests](https://github.com/SigmaHQ/pySigma-pipeline-sysmon/actions/workflows/test.yml/badge.svg)
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/thomaspatzke/9c695cb26aae10cb8107941388340ec1/raw)
![Tests](https://github.com/SigmaHQ/pySigma-pipeline-windows/actions/workflows/test.yml/badge.svg)
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/thomaspatzke/143d6c718b5bbc9fb7c0e33ed06b0f85/raw)
![Status](https://img.shields.io/badge/Status-pre--release-orange)

# pySigma windows Processing Pipeline
# pySigma Windows Processing Pipeline

This is the windows service processing pipeline for pySigma. It provides the package `sigma.pipeline.windows` with the `windows_pipeline` function that returns a ProcessingPipeline object.

Expand Down
35 changes: 0 additions & 35 deletions cov.xml

This file was deleted.

Loading

0 comments on commit dc6edd8

Please sign in to comment.