-
Notifications
You must be signed in to change notification settings - Fork 1
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 #25 from aserto-dev/split_packages
Split python packages
- Loading branch information
Showing
71 changed files
with
1,107 additions
and
3,083 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 |
---|---|---|
|
@@ -18,8 +18,8 @@ env: | |
|
||
|
||
jobs: | ||
tests: | ||
name: Run tests | ||
test: | ||
name: Run test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Read Configuration | ||
|
@@ -57,26 +57,89 @@ jobs: | |
with: | ||
version: 1.2.1 | ||
|
||
- name: Lint & test aserto package | ||
- name: Run lint | ||
run: | | ||
cd packages/aserto | ||
poetry install | ||
poetry run pyright . | ||
- name: Run tests | ||
run: | | ||
poetry run pytest -vv | ||
cd ../.. | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
- name: Lint & test aserto-idp package | ||
run : | | ||
cd packages/aserto-idp | ||
poetry install | ||
poetry run pyright . | ||
poetry run pytest -vv | ||
cd ../.. | ||
name: Release to pypi | ||
steps: | ||
- name: Read Configuration | ||
uses: hashicorp/[email protected] | ||
id: vault | ||
with: | ||
url: ${{ env.VAULT_ADDR }} | ||
token: ${{ secrets.VAULT_TOKEN }} | ||
secrets: | | ||
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY; | ||
kv/data/pypi "API_TOKEN" | POETRY_HTTP_BASIC_PYPI_PASSWORD; | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Setup caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
.ext | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', 'Depfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install dependencies | ||
run: | | ||
mkdir -p $HOME/.ssh | ||
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa | ||
ssh-keyscan github.com >> $HOME/.ssh/known_hosts | ||
git config --global url."[email protected]:".insteadOf https://github.com/ | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Aserto Bot" | ||
eval `ssh-agent` | ||
ssh-add $HOME/.ssh/id_rsa | ||
go run mage.go deps | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Build and push the python package | ||
env: | ||
# When using a PYPI API token, the user name must be set to "__token__" | ||
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__ | ||
run: go run mage.go release | ||
|
||
- name: Bump to the next version | ||
run: go run mage.go bump patch | ||
|
||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: 'Bump to next version' | ||
add: 'pyproject.toml' | ||
push: origin HEAD:main | ||
|
||
- name: Lint & test flask-aserto package | ||
run : | | ||
cd packages/flask-aserto | ||
poetry install | ||
poetry run pyright . | ||
poetry run pytest -vv | ||
cd ../.. |
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,13 @@ | ||
name: gitleaks-check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: gitleaks-check | ||
uses: aserto-dev/gitleaks-action@master |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
--- | ||
go: | ||
sver: | ||
importPath: "github.com/aserto-dev/sver/cmd/sver" | ||
version: "v1.3.13" |
Oops, something went wrong.