Skip to content

Commit

Permalink
Merge branch 'main' into 75-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
Karina5005 committed Oct 11, 2023
2 parents 28c0cfc + 72a8567 commit 4295c22
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 123 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
name: "Title"
runs-on: ubuntu-20.04
permissions: write-all
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: "Check PR title"
uses: amannn/action-semantic-pull-request@v5
Expand All @@ -27,5 +29,3 @@ jobs:
requireScope: false
wip: true
validateSingleCommit: false
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish
on:
release:
types:
- created

jobs:
publish-pypi:
name: "Release to PYPI"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
59 changes: 19 additions & 40 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
name: Push
on:
push:
branches-ignore: [ main ]
branches-ignore:
- main
workflow_call:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2

code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
Expand All @@ -39,24 +25,17 @@ jobs:
run: poetry run black .
- name: Run isort
run: poetry run isort . --profile black

code-quality:
needs: code-style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Commit style changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Install dependencies
run: poetry install
- name: Run black
commit_message: "fix: style fixes"
- name: Check black
run: poetry run black . --check
- name: Run isort
- name: Check isort
run: poetry run isort . --check-only --profile black
- name: Run flake8
- name: Check flake8
run: poetry run flake8 . --max-line-length 120
- name: Run tests
run: poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
89 changes: 19 additions & 70 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,26 @@ on:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2

code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Install dependencies
run: poetry install
- name: Run black
run: poetry run black .
- name: Run isort
run: poetry run isort . --profile black

code-quality:
needs: code-style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- name: Install dependencies
run: poetry install
- name: Run black
run: poetry run black . --check
- name: Run isort
run: poetry run isort . --check-only --profile black
- name: Run flake8
run: poetry run flake8 . --max-line-length 120
tests:
name: "Run tests"
uses: ./.github/workflows/push.yaml
secrets: inherit

release:
needs: [test, code-quality]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
needs: tests
name: "Release"
runs-on: ubuntu-20.04
permissions: write-all
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.3.2'
- uses: bjoluc/semantic-release-config-poetry@v2
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
github_token: ${{ secrets.GH_TOKEN }}
- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 18.0.0
extra_plugins: |
@semantic-release/changelog@6.0.0
@semantic-release/exec@6.0.3
@semantic-release/git@10.0.0
conventional-changelog-conventionalcommits@4.6.3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ venv/
testing/
*.xml
*.prom
poetry.lock
51 changes: 51 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"branches": [
"main"
],
"ci": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file."
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/^version.*$/version = \"${nextRelease.version}\"/' pyproject.toml ; cat pyproject.toml"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"pyproject.toml"
],
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
93 changes: 92 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,99 @@
# Changelog

All notable changes to this project will be documented in this file. See
All notable changes to this project will be documented in this file.

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-11)


### Bug Fixes

* semantic release ([#76](https://github.com/cloud-labs-infra/github-backup/issues/76)) ([a502cc1](https://github.com/cloud-labs-infra/github-backup/commit/a502cc1788ebc20a531e393f3d950b286a219a2d))
* update pyproject.toml ([3df679e](https://github.com/cloud-labs-infra/github-backup/commit/3df679e2a85683218c16700732ac5a68f8f0ba9d))
* update pyproject.toml ([24f557d](https://github.com/cloud-labs-infra/github-backup/commit/24f557d2598d3976c2341bf560e367fefdd67b1e))
* update pyproject.toml ([5d03720](https://github.com/cloud-labs-infra/github-backup/commit/5d03720c655ec89c3460cc9de991465107fc1a50))
* update pyproject.toml ([1a924a1](https://github.com/cloud-labs-infra/github-backup/commit/1a924a1c31e643c796af1c5e9a3c09a02492d6de))

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-10)


### Bug Fixes

* semantic release ([#76](https://github.com/cloud-labs-infra/github-backup/issues/76)) ([a502cc1](https://github.com/cloud-labs-infra/github-backup/commit/a502cc1788ebc20a531e393f3d950b286a219a2d))
* update pyproject.toml ([24f557d](https://github.com/cloud-labs-infra/github-backup/commit/24f557d2598d3976c2341bf560e367fefdd67b1e))
* update pyproject.toml ([5d03720](https://github.com/cloud-labs-infra/github-backup/commit/5d03720c655ec89c3460cc9de991465107fc1a50))
* update pyproject.toml ([1a924a1](https://github.com/cloud-labs-infra/github-backup/commit/1a924a1c31e643c796af1c5e9a3c09a02492d6de))

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-10)


### Bug Fixes

* semantic release ([#76](https://github.com/cloud-labs-infra/github-backup/issues/76)) ([a502cc1](https://github.com/cloud-labs-infra/github-backup/commit/a502cc1788ebc20a531e393f3d950b286a219a2d))
* update pyproject.toml ([5d03720](https://github.com/cloud-labs-infra/github-backup/commit/5d03720c655ec89c3460cc9de991465107fc1a50))
* update pyproject.toml ([1a924a1](https://github.com/cloud-labs-infra/github-backup/commit/1a924a1c31e643c796af1c5e9a3c09a02492d6de))

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-10)


### Bug Fixes

* semantic release ([#76](https://github.com/cloud-labs-infra/github-backup/issues/76)) ([a502cc1](https://github.com/cloud-labs-infra/github-backup/commit/a502cc1788ebc20a531e393f3d950b286a219a2d))
* update pyproject.toml ([1a924a1](https://github.com/cloud-labs-infra/github-backup/commit/1a924a1c31e643c796af1c5e9a3c09a02492d6de))

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-10)


### Bug Fixes

* semantic release ([#76](https://github.com/cloud-labs-infra/github-backup/issues/76)) ([a502cc1](https://github.com/cloud-labs-infra/github-backup/commit/a502cc1788ebc20a531e393f3d950b286a219a2d))

### [1.0.10](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.9...v1.0.10) (2023-10-09)


### Bug Fixes

* release branch ([579397b](https://github.com/cloud-labs-infra/github-backup/commit/579397b7fe9bc049f26b82c551608bc0f2bc8b5a))
* remove exec install ([a60f65c](https://github.com/cloud-labs-infra/github-backup/commit/a60f65c4abd3066816f3d7bec599be6f42a67c9a))

### [1.0.9](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.8...v1.0.9) (2023-10-09)


### Bug Fixes

* publish workflow ([73919df](https://github.com/cloud-labs-infra/github-backup/commit/73919df33098d2b99663ba7177ed41e3423d8997))

### [1.0.8](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.7...v1.0.8) (2023-10-09)


### Bug Fixes

* step name ([a9b59e7](https://github.com/cloud-labs-infra/github-backup/commit/a9b59e7c45ace5ac00afbe87c3e227ba6af3da9e))

### [1.0.7](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.6...v1.0.7) (2023-10-09)


### Bug Fixes

* commit style changes ([52c0a43](https://github.com/cloud-labs-infra/github-backup/commit/52c0a43658abfd89261e5413e49da7543f2c39df))
* style fixes ([3c7d1f7](https://github.com/cloud-labs-infra/github-backup/commit/3c7d1f71931ba17461a260ba76819dc6e7d90c52))

See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.0.6](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.5...v1.0.6) (2023-10-09)


### Bug Fixes

* update pyproject.toml ([b7f1120](https://github.com/cloud-labs-infra/github-backup/commit/b7f112053cbdf717c32e586df0637be4840ed90a))

## [1.0.5](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.4...v1.0.5) (2023-10-09)


### Bug Fixes

* push workflow ([#74](https://github.com/cloud-labs-infra/github-backup/issues/74)) ([625ba1a](https://github.com/cloud-labs-infra/github-backup/commit/625ba1a168cc18b2d553ee52aac7efab21037b73))

## [1.0.4](https://github.com/cloud-labs-infra/github-backup/compare/v1.0.3...v1.0.4) (2023-10-09)


Expand Down
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "backup-github-org"
version = "1.0.4"
version = "1.0.7"
description = ""
authors = ["Karina5005 <karinaanisimova23062001@gmail.com>"]
readme = "README.md"
Expand All @@ -27,12 +27,3 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
backup-github = "backup_github.main:main"

[tool.semantic_release]
version_variable = [
"pyproject.toml:version"
]
branch = "main"
upload_to_pypi = true
upload_to_release = true
build_command = "pip install poetry && poetry build"

0 comments on commit 4295c22

Please sign in to comment.