Skip to content

Commit

Permalink
0.3.0: Bump python support (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd authored Oct 21, 2024
2 parents ba56da1 + 8e99104 commit c683280
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 251 deletions.
129 changes: 0 additions & 129 deletions .github/workflows/ci.yaml

This file was deleted.

117 changes: 117 additions & 0 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Tox CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install tox
run: pip install --user tox

- name: Lint
run: tox -e lint

unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install --user tox

- name: Select tox env
id: tox-env
run: echo tox-env=py${{ matrix.python-version }}-unit | tr -d '.' >> ${GITHUB_OUTPUT}

- name: Run Unit Tests
run: tox -e ${{ steps.tox-env.outputs.tox-env }}

integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
services:
vault:
image: hashicorp/vault:1.14.8
ports:
- 8200:8200
env:
VAULT_DEV_ROOT_TOKEN_ID: st2token

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install --user tox

- name: Select tox env
id: tox-env
run: echo tox-env=py${{ matrix.python-version }}-integration | tr -d '.' >> ${GITHUB_OUTPUT}

- name: Run Integration Tests
run: tox -e ${{ steps.tox-env.outputs.tox-env }}
env:
VAULT_TOKEN: st2token
VAULT_ADDR: http://127.0.0.1:8200

set_merge_ok:
name: Set Merge OK
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- lint
- unit-tests
- integration-tests
outputs:
merge_ok: ${{ steps.set_merge_ok.outputs.merge_ok }}
runs-on: ubuntu-latest
steps:
- id: set_merge_ok
run: echo 'merge_ok=true' >> ${GITHUB_OUTPUT}

merge_ok:
name: Merge OK
if: always()
needs:
- set_merge_ok
runs-on: ubuntu-latest
steps:
- run: |
merge_ok="${{ needs.set_merge_ok.outputs.merge_ok }}"
if [[ "${merge_ok}" == "true" ]]; then
echo "Merge OK"
exit 0
else
echo "Merge NOT OK"
exit 1
fi
60 changes: 0 additions & 60 deletions Makefile

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# HashiCorp Vault authentication backend for StackStorm

[![Build Status](https://github.com/StackStorm/st2-auth-backend-vault/actions/workflows/ci.yaml/badge.svg)](https://github.com/StackStorm/st2-auth-backend-vault/actions/workflows/ci.yaml)
[![Join our community Slack](https://stackstorm-community.herokuapp.com/badge.svg)](https://stackstorm.com/community-signup)
[![Forum](https://img.shields.io/discourse/https/forum.stackstorm.com/posts.svg)](https://forum.stackstorm.com/)
[![Build Status](https://github.com/StackStorm/st2-auth-backend-vault/actions/workflows/tox.yaml/badge.svg)](https://github.com/StackStorm/st2-auth-backend-vault/actions/workflows/tox.yaml)

## Overview

Expand Down
19 changes: 0 additions & 19 deletions Vagrantfile

This file was deleted.

7 changes: 1 addition & 6 deletions lint-configs/python/.pylintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
[MESSAGES CONTROL]
# C0111 Missing docstring
# I0011 Warning locally suppressed using disable-msg
# I0012 Warning locally suppressed using disable-msg
# W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
# W0212 Access to a protected member %s of a client class
# W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
# W0613 Unused argument %r Used when a function or method argument is not used.
# W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
# R0201 Method could be a function
# W0614 Unused import XYZ from wildcard import
# R0914 Too many local variables
# R0912 Too many branches
# R0915 Too many statements
# R0913 Too many arguments
# R0904 Too many public methods
# E0211: Method has no argument
disable=C0103,C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,W0614,R0914,R0912,R0915,R0913,R0904,R0801
disable=C0103,C0111,I0011,W0212,W0613,W0702,W0614,R0914,R0912,R0915,R0913,R0904,R0801

[TYPECHECK]
# Note: This modules are manipulated during the runtime so we can't detect all the properties during
Expand Down
Loading

0 comments on commit c683280

Please sign in to comment.