-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update workflows to run on GitHub #328
Merged
Merged
Changes from 45 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
6e07de6
commit inital changes
wbarnha 10e1052
add setuptools_scm
wbarnha b50a628
Revert "add setuptools_scm"
wbarnha bd9aff7
add more updates
wbarnha 1b132c8
remove all references to loop=loop
wbarnha e532509
revert change
wbarnha 3b88964
revert changes
wbarnha d896c0a
revert changes
wbarnha 82cb4a8
fix all_tasks call
wbarnha a5790dd
add dist.yaml
wbarnha a5f4736
add gh-pages.yml
wbarnha 972952f
always deploy docs for now
wbarnha 51d92b0
bump notes for 0.4.6
wbarnha 0891791
freeze versions in requirements-dev.txt
wbarnha effe33b
Merge branch 'revive-cicd'
wbarnha 371d36b
eol py3.7
wbarnha dc85438
Merge branch 'revive-cicd'
wbarnha 93eea6a
experiment with caching
wbarnha 509bae4
change rules
wbarnha 5050099
experiment with new flow
wbarnha 9ae510b
rename main to master
wbarnha bc31f2c
replace needs:check with needs:tests
wbarnha 5b1784d
rename environ_config to aiiomoitor
wbarnha 044876b
use setuptools_scm and importlib for automatic versioning
wbarnha cda3d3d
disable py3.7
wbarnha 96e16ef
disable nox usage
wbarnha 7b8285b
fix setup.py flaking
wbarnha 5c434ad
fix doc build
wbarnha 6745629
disable 3.12 tests
wbarnha 94b6e68
rename refernces from aiomysql to aiomontior
wbarnha df5fe80
cleanup
wbarnha 1065730
update ci-cd.yml
wbarnha 5feaf83
partial revert
wbarnha 496ca64
Add check
wbarnha 9a20704
remove SQL refs
wbarnha b181f5d
Update .github/workflows/ci-cd.yml
wbarnha dbf1869
remove issue_templates
wbarnha 742b0d2
use codecov
wbarnha f85db30
reorg
wbarnha 524b5b7
add names
wbarnha 464914a
add forgotten fetch-depth
wbarnha 0c91411
change checkout-sdist
wbarnha 3cd4506
get required dependencies for testing
wbarnha 9f5c4f5
address change with depth:0
wbarnha e0b5402
add environment:pypi
wbarnha 0fa33c7
Merge branch 'master' into update-workflows
achimnol 86d292d
ci: Merge the contents of ci-cd.yml and default.yml
achimnol c235552
ci: Fix the needs list
achimnol 4ac71bc
fix: Rename gh-page.yml to docs.yml and fix typo
achimnol 0f3952a
fix: Remove duplicate step names
achimnol 369145e
ci: Use the ghactions doc way of marking experimental tests
achimnol 0b158e7
ci: Fix renaming job steps
achimnol d2ecaa1
ci: Relax the dependabot check interval to one month
achimnol 7d00298
ci: Let docs workflow install only required stuffs
achimnol 13f58de
ci: Fix the docs workflow
achimnol a2fcf69
Instruct git to render .git_archival.txt
achimnol f9bff01
ci: Run build-sdist first
achimnol e1f8e02
ci: Rename default.yml to ci-cd.yml
achimnol 93c19f0
ci: Let it run sdist-build always and remove "-I" on pip invocation
achimnol de09c69
fix: Make type-anno compatible with Python 3.8
achimnol 85cf3ed
fix: Make type anno compatible with Python 3.8
achimnol a481650
Merge branch 'master' into update-workflows
achimnol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
target-branch: master | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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,120 @@ | ||
--- | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
env: | ||
FORCE_COLOR: "1" # Make tools pretty. | ||
PIP_DISABLE_PIP_VERSION_CHECK: "1" | ||
PIP_NO_PYTHON_VERSION_WARNING: "1" | ||
PYTHON_LATEST: "3.11" | ||
|
||
# For re-actors/checkout-python-sdist | ||
sdist-artifact: python-package-distributions | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-sdist: | ||
name: 📦 Build the source distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
wbarnha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Checkout project | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
name: Setup ${{ env.PYTHON_LATEST }} | ||
with: | ||
python-version: ${{ env.PYTHON_LATEST }} | ||
- run: python -Im pip install build | ||
achimnol marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Install core libraries for build and install | ||
|
||
- run: python -Im build | ||
name: Build artifacts | ||
|
||
- uses: actions/upload-artifact@v3 | ||
name: Upload built artifacts for testing | ||
with: | ||
name: ${{ env.sdist-artifact }} | ||
# NOTE: Exact expected file names are specified here | ||
# NOTE: as a safety measure — if anything weird ends | ||
# NOTE: up being in this dir or not all dists will be | ||
# NOTE: produced, this will fail the workflow. | ||
path: dist/${{ env.sdist-name }} | ||
retention-days: 15 | ||
|
||
tests: | ||
name: Tests on ${{ matrix.python-version }} | ||
needs: build-sdist | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
wbarnha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- "~3.12.0-0" | ||
continue-on-error: >- | ||
${{ contains(matrix.python-version, '~') && true || false }} | ||
steps: | ||
- name: Get source code from pre-built sdist | ||
uses: re-actors/checkout-python-sdist@release/v1 | ||
with: | ||
workflow-artifact-name: ${{ env.sdist-artifact }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v3 | ||
name: Checkout project to get necessary dependencies for testing | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade setuptools | ||
pip install -r requirements-dev.txt | ||
wbarnha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Upload coverage data | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
|
||
check: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
deploy: # Run only on creating release for new tag | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
needs: check | ||
environment: pypi | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
wbarnha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
name: Download artifacts | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
name: Publish package to PyPI | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,49 @@ | ||
name: Pages | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
release: | ||
types: [created] | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
name: "Build docs" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | ||
- name: "Install runtime dependencies" | ||
run: > | ||
pip install -r requirements-dev.txt | ||
pip install -r requirements-doc.txt | ||
pip install -e . | ||
- name: "Install doc build deps and build with Sphinx" | ||
run: make doc | ||
- name: "Upload artifacts" | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload built docs | ||
path: "./docs/_build/html/" | ||
deploy: | ||
name: "Deploy docs" | ||
needs: build | ||
runs-on: ubuntu-latest | ||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- uses: actions/deploy-pages@v1 | ||
id: deployment | ||
name: "Deploy to GitHub Pages" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think daily update may be too frequent.
How about once for two weeks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately dependabot configuration only allows "daily", "weekly" or "monthly".
I'm going to set it "monthly", to prevent spamming.