-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomer Figenblat <[email protected]>
- Loading branch information
Showing
15 changed files
with
299 additions
and
250 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
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
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ pr: | |
conventionalTitle: | ||
tasksList: | ||
autoApprove: | ||
users: ['dependabot', 'allcontributors'] | ||
users: ['dependabot'] |
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,30 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: /.github/workflows | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "type: dependencies" | ||
commit-message: | ||
prefix: "ci" | ||
include: "scope" | ||
assignees: | ||
- "tomerfi" | ||
- "thecode" | ||
- "YogevBokobza" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
labels: | ||
- "type: dependencies" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
assignees: | ||
- "tomerfi" | ||
- "thecode" | ||
- "YogevBokobza" |
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,71 @@ | ||
--- | ||
name: Build docs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
required: true | ||
type: string | ||
description: Python version to run with | ||
checkout_ref: | ||
required: true | ||
type: string | ||
description: Checkout reference | ||
deploy-pages: | ||
required: false | ||
default: false | ||
type: boolean | ||
description: Deploy to GH-pages | ||
secrets: | ||
github_token: | ||
required: false | ||
description: GitHub token required if inputs.deploy-pages is true | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Source checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.checkout_ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Cache pip repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ inputs.python_version }} | ||
|
||
- name: Prepare python environment | ||
run: | | ||
pip install -r requirements.txt | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: Cache poetry virtual environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-poetry-docs-${{ hashFiles('**/pyproject.toml') }}-${{ inputs.python_version }} | ||
|
||
- name: Build documentation site | ||
run: | | ||
poetry install --no-interaction --no-update --without dev | ||
poetry run poe docs_build | ||
- name: Deploy to GH-Pages | ||
if: ${{ inputs.deploy-pages }} | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
publish_dir: ./site | ||
cname: aioswitcher.tomfi.info | ||
commit_message: 'docs: deployed documentation site ' |
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,85 @@ | ||
--- | ||
name: Test project | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
required: true | ||
type: string | ||
description: Python version to run with | ||
push_coverage: | ||
required: false | ||
default: true | ||
type: boolean | ||
description: Create and push coverage report | ||
report_tests: | ||
required: false | ||
default: false | ||
type: boolean | ||
description: Report test summary | ||
secrets: | ||
codecov_token: | ||
required: false | ||
description: Codecov token required if inputs.push_coverage is true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Source checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup timezone | ||
uses: zcong1993/[email protected] | ||
with: | ||
timezone: Asia/Jerusalem | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Cache pip repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ inputs.python_version }} | ||
|
||
- name: Prepare python environment | ||
run: | | ||
pip install -r requirements.txt | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: Cache poetry virtual environment | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-poetry-test-${{ hashFiles('**/pyproject.toml') }}-${{ inputs.python_version }} | ||
|
||
- name: Install project build dependencies | ||
run: poetry install --no-interaction --no-update | ||
|
||
- name: Test the project | ||
run: > | ||
if [ ${{ inputs.push_coverage }} ]; | ||
then poetry run poe test_rep; | ||
else poetry run poe test; fi | ||
- name: Report test summary | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: ${{ inputs.report_tests && always() }} | ||
with: | ||
test_changes_limit: 0 | ||
junit_files: ./junit.xml | ||
report_individual_runs: true | ||
|
||
- name: Push to CodeCov | ||
uses: codecov/codecov-action@v5 | ||
if: ${{ inputs.push_coverage }} | ||
with: | ||
token: ${{ secrets.codecov_token }} | ||
files: ./coverage.xml |
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 |
---|---|---|
|
@@ -2,52 +2,20 @@ | |
name: Pages Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
MAIN_PY_VER: "3.10" | ||
|
||
jobs: | ||
deploy-pages: | ||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
name: Build documentation site and deploy to GH-Pages | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache pip repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Prepare python environment | ||
run: | | ||
pip install -r requirements.txt | ||
poetry config virtualenvs.create true | ||
poetry config virtualenvs.in-project true | ||
- name: Cache poetry virtual environment | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }} | ||
|
||
- name: Build documentation site | ||
run: | | ||
poetry install --no-interaction --without dev | ||
poetry run poe docs_build | ||
- name: Deploy to GH-Pages | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site | ||
cname: aioswitcher.tomfi.info | ||
commit_message: 'docs: deployed documentation site ' | ||
uses: ./.github/workflows/on_call/docs.yml | ||
with: | ||
python_version: ${{ env.MAIN_PY_VER }} | ||
checkout_ref: ${{ github.ref }} | ||
deploy-pages: true | ||
secrets: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.