mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-15 04:26:55 +08:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9230b4c574 | ||
|
|
0c1e72cfd6 | ||
|
|
adef08d3bd | ||
|
|
191a6471ed | ||
|
|
3ae8451cc0 | ||
|
|
f4951ec52e | ||
|
|
cc576ce25a | ||
|
|
decf16ff8f | ||
|
|
9faa1459c9 | ||
|
|
eb1108c0f0 | ||
|
|
47ef801713 | ||
|
|
27272d362c | ||
|
|
b12b2d65be | ||
|
|
bc41308f30 | ||
|
|
bbcfd70907 | ||
|
|
c2c2516ec8 | ||
|
|
57a0827b14 | ||
|
|
17bc23954a | ||
|
|
97fd0e5927 | ||
|
|
60dd89651a | ||
|
|
8d0bd87229 | ||
|
|
31f02bb75b | ||
|
|
c11c7295f6 | ||
|
|
09205eccb8 | ||
|
|
72f3e4c148 | ||
|
|
d340857eb3 | ||
|
|
c8b411bb64 | ||
|
|
895a8764b3 | ||
|
|
2305ab2027 | ||
|
|
37a055c776 | ||
|
|
f0ad308283 | ||
|
|
562b28ee34 | ||
|
|
00c43821dd | ||
|
|
8cfda1f21a | ||
|
|
457870d760 | ||
|
|
df3d45363b | ||
|
|
6ba0204549 | ||
|
|
7a7976677e | ||
|
|
4579381b78 |
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Maintain GitHub Action runners
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
target-branch: dev
|
||||||
|
commit-message:
|
||||||
|
prefix: "[Dependabot]"
|
||||||
|
labels:
|
||||||
|
- Dependencies
|
||||||
|
assignees:
|
||||||
|
- Paebbels
|
||||||
|
- Umarcor
|
||||||
|
reviewers:
|
||||||
|
- Paebbels
|
||||||
|
- Umarcor
|
||||||
|
schedule:
|
||||||
|
interval: "daily" # Checks on Monday trough Friday.
|
||||||
8
.github/pull_request_template.md
vendored
8
.github/pull_request_template.md
vendored
@@ -1,8 +1,16 @@
|
|||||||
# New Features
|
# New Features
|
||||||
|
|
||||||
* tbd
|
* tbd
|
||||||
|
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
* tbd
|
* tbd
|
||||||
|
|
||||||
# Bug Fixes
|
# Bug Fixes
|
||||||
|
|
||||||
|
* tbd
|
||||||
|
|
||||||
|
----------
|
||||||
|
# Related PRs:
|
||||||
|
|
||||||
* tbd
|
* tbd
|
||||||
|
|||||||
6
.github/workflows/ArtifactCleanUp.yml
vendored
6
.github/workflows/ArtifactCleanUp.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -45,12 +45,12 @@ jobs:
|
|||||||
|
|
||||||
- name: 🗑️ Delete package Artifacts
|
- name: 🗑️ Delete package Artifacts
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/tags') }}
|
if: ${{ ! startsWith(github.ref, 'refs/tags') }}
|
||||||
uses: geekyeggo/delete-artifact@v1
|
uses: geekyeggo/delete-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.package }}
|
name: ${{ inputs.package }}
|
||||||
|
|
||||||
- name: 🗑️ Delete remaining Artifacts
|
- name: 🗑️ Delete remaining Artifacts
|
||||||
if: ${{ inputs.remaining != '' }}
|
if: ${{ inputs.remaining != '' }}
|
||||||
uses: geekyeggo/delete-artifact@v1
|
uses: geekyeggo/delete-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.remaining }}
|
name: ${{ inputs.remaining }}
|
||||||
|
|||||||
6
.github/workflows/BuildTheDocs.yml
vendored
6
.github/workflows/BuildTheDocs.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🛳️ Build documentation
|
- name: 🛳️ Build documentation
|
||||||
uses: buildthedocs/btd@v0
|
uses: buildthedocs/btd@v0
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
skip-deploy: true
|
skip-deploy: true
|
||||||
|
|
||||||
- name: 📤 Upload 'documentation' artifacts
|
- name: 📤 Upload 'documentation' artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: doc/_build/html
|
path: doc/_build/html
|
||||||
|
|||||||
20
.github/workflows/CoverageCollection.yml
vendored
20
.github/workflows/CoverageCollection.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -62,10 +62,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
@@ -79,6 +79,7 @@ jobs:
|
|||||||
id: getVariables
|
id: getVariables
|
||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
|
from os import environ
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tomli import load as tomli_load
|
from tomli import load as tomli_load
|
||||||
|
|
||||||
@@ -110,8 +111,11 @@ jobs:
|
|||||||
else:
|
else:
|
||||||
print(f"File '{coverageRCFile}' not found.")
|
print(f"File '{coverageRCFile}' not found.")
|
||||||
|
|
||||||
print(f"::set-output name=coverage_report_html_directory::{htmlDirectory}")
|
with open(environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gho:
|
||||||
print(f"::set-output name=coverage_report_xml::{xmlFile}")
|
gho.write(f"""\
|
||||||
|
coverage_report_html_directory={htmlDirectory}
|
||||||
|
coverage_report_xml={xmlFile}
|
||||||
|
""")
|
||||||
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")
|
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")
|
||||||
|
|
||||||
- name: Collect coverage
|
- name: Collect coverage
|
||||||
@@ -130,7 +134,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 📤 Upload 'Coverage Report' artifact
|
- name: 📤 Upload 'Coverage Report' artifact
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
|
path: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
|
||||||
@@ -139,9 +143,9 @@ jobs:
|
|||||||
|
|
||||||
- name: 📊 Publish coverage at CodeCov
|
- name: 📊 Publish coverage at CodeCov
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ${{ steps.getVariables.outputs.coverage_report_xml }}
|
files: ${{ steps.getVariables.outputs.coverage_report_xml }}
|
||||||
flags: unittests
|
flags: unittests
|
||||||
env_vars: PYTHON
|
env_vars: PYTHON
|
||||||
|
|
||||||
|
|||||||
28
.github/workflows/Package.yml
vendored
28
.github/workflows/Package.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -48,10 +48,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
@@ -72,23 +72,37 @@ jobs:
|
|||||||
if: inputs.requirements == ''
|
if: inputs.requirements == ''
|
||||||
run: python -m build --wheel
|
run: python -m build --wheel
|
||||||
|
|
||||||
|
# build (not isolated)
|
||||||
|
|
||||||
|
- name: 🔧 [build] Install dependencies for packaging and release
|
||||||
|
if: inputs.requirements == 'no-isolation'
|
||||||
|
run: python -m pip install build
|
||||||
|
|
||||||
|
- name: 🔨 [build] Build Python package (source distribution)
|
||||||
|
if: inputs.requirements == 'no-isolation'
|
||||||
|
run: python -m build --no-isolation --sdist
|
||||||
|
|
||||||
|
- name: 🔨 [build] Build Python package (binary distribution - wheel)
|
||||||
|
if: inputs.requirements == 'no-isolation'
|
||||||
|
run: python -m build --no-isolation --wheel
|
||||||
|
|
||||||
# setuptools
|
# setuptools
|
||||||
|
|
||||||
- name: 🔧 [setuptools] Install dependencies for packaging and release
|
- name: 🔧 [setuptools] Install dependencies for packaging and release
|
||||||
if: inputs.requirements != ''
|
if: inputs.requirements != '' && inputs.requirements != 'no-isolation'
|
||||||
run: python -m pip install ${{ inputs.requirements }}
|
run: python -m pip install ${{ inputs.requirements }}
|
||||||
|
|
||||||
- name: 🔨 [setuptools] Build Python package (source distribution)
|
- name: 🔨 [setuptools] Build Python package (source distribution)
|
||||||
if: inputs.requirements != ''
|
if: inputs.requirements != '' && inputs.requirements != 'no-isolation'
|
||||||
run: python setup.py sdist
|
run: python setup.py sdist
|
||||||
|
|
||||||
- name: 🔨 [setuptools] Build Python package (binary distribution - wheel)
|
- name: 🔨 [setuptools] Build Python package (binary distribution - wheel)
|
||||||
if: inputs.requirements != ''
|
if: inputs.requirements != '' && inputs.requirements != 'no-isolation'
|
||||||
run: python setup.py bdist_wheel
|
run: python setup.py bdist_wheel
|
||||||
|
|
||||||
|
|
||||||
- name: 📤 Upload wheel artifact
|
- name: 📤 Upload wheel artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
13
.github/workflows/Parameters.yml
vendored
13
.github/workflows/Parameters.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -65,6 +65,8 @@ jobs:
|
|||||||
id: params
|
id: params
|
||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
|
from os import environ
|
||||||
|
|
||||||
name = '${{ inputs.name }}'
|
name = '${{ inputs.name }}'
|
||||||
params = {
|
params = {
|
||||||
'python_version': '${{ inputs.python_version }}',
|
'python_version': '${{ inputs.python_version }}',
|
||||||
@@ -76,7 +78,9 @@ jobs:
|
|||||||
'doc': f'{name}-doc',
|
'doc': f'{name}-doc',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print(f'::set-output name=params::{params!s}')
|
|
||||||
|
with open(environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gho:
|
||||||
|
gho.write(f"params={params!s}\n")
|
||||||
print("Parameters:")
|
print("Parameters:")
|
||||||
print(params)
|
print(params)
|
||||||
|
|
||||||
@@ -112,8 +116,9 @@ jobs:
|
|||||||
'python': '3.11.0-alpha.3' if version == '3.11' else version
|
'python': '3.11.0-alpha.3' if version == '3.11' else version
|
||||||
}
|
}
|
||||||
for system in systems
|
for system in systems
|
||||||
for version in (versions if system != 'msys2' else ['3.9'])
|
for version in (versions if system != 'msys2' else ['3.10'])
|
||||||
]
|
]
|
||||||
print(f'::set-output name=python_jobs::{jobs!s}')
|
with open(environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gho:
|
||||||
|
gho.write(f"python_jobs={jobs!s}\n")
|
||||||
print("Python jobs:")
|
print("Python jobs:")
|
||||||
print(jobs)
|
print(jobs)
|
||||||
|
|||||||
6
.github/workflows/PublishOnPyPI.yml
vendored
6
.github/workflows/PublishOnPyPI.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -52,13 +52,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job
|
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/PublishTestResults.yml
vendored
6
.github/workflows/PublishTestResults.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -39,10 +39,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
|
|||||||
10
.github/workflows/PublishToGitHubPages.yml
vendored
10
.github/workflows/PublishToGitHubPages.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -48,24 +48,24 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 📥 Download artifacts '${{ inputs.doc }}' from 'BuildTheDocs' job
|
- name: 📥 Download artifacts '${{ inputs.doc }}' from 'BuildTheDocs' job
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.doc }}
|
name: ${{ inputs.doc }}
|
||||||
path: public
|
path: public
|
||||||
|
|
||||||
- name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job
|
- name: 📥 Download artifacts '${{ inputs.coverage }}' from 'Coverage' job
|
||||||
if: ${{ inputs.coverage != '' }}
|
if: ${{ inputs.coverage != '' }}
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.coverage }}
|
name: ${{ inputs.coverage }}
|
||||||
path: public/coverage
|
path: public/coverage
|
||||||
|
|
||||||
- name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job
|
- name: 📥 Download artifacts '${{ inputs.typing }}' from 'StaticTypeCheck' job
|
||||||
if: ${{ inputs.typing != '' }}
|
if: ${{ inputs.typing != '' }}
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.typing }}
|
name: ${{ inputs.typing }}
|
||||||
path: public/typing
|
path: public/typing
|
||||||
|
|||||||
10
.github/workflows/Release.yml
vendored
10
.github/workflows/Release.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -39,9 +39,11 @@ jobs:
|
|||||||
RELEASE_VERSION=${GIT_TAG#v}
|
RELEASE_VERSION=${GIT_TAG#v}
|
||||||
RELEASE_DATETIME="$(date --utc '+%d.%m.%Y - %H:%M:%S')"
|
RELEASE_DATETIME="$(date --utc '+%d.%m.%Y - %H:%M:%S')"
|
||||||
# write to step outputs
|
# write to step outputs
|
||||||
echo ::set-output name=gitTag::${GIT_TAG}
|
cat >> "$GITHUB_OUTPUT" << EOF
|
||||||
echo ::set-output name=version::${RELEASE_VERSION}
|
gitTag=${GIT_TAG}
|
||||||
echo ::set-output name=datetime::${RELEASE_DATETIME}
|
version=${RELEASE_VERSION}
|
||||||
|
datetime=${RELEASE_DATETIME}
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: 📑 Create Release Page
|
- name: 📑 Create Release Page
|
||||||
id: createReleasePage
|
id: createReleasePage
|
||||||
|
|||||||
8
.github/workflows/StaticTypeCheck.yml
vendored
8
.github/workflows/StaticTypeCheck.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -57,10 +57,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
- name: 🐍 Setup Python ${{ inputs.python_version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
- name: 📤 Upload 'Static Typing Report' artifact
|
- name: 📤 Upload 'Static Typing Report' artifact
|
||||||
if: ${{ inputs.artifact != '' }}
|
if: ${{ inputs.artifact != '' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: ${{ inputs.report }}
|
path: ${{ inputs.report }}
|
||||||
|
|||||||
8
.github/workflows/TestReleaser.yml
vendored
8
.github/workflows/TestReleaser.yml
vendored
@@ -3,7 +3,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build container image
|
- name: Build container image
|
||||||
run: docker build -t ghcr.io/pytooling/releaser -f releaser/Dockerfile releaser
|
run: docker build -t ghcr.io/pytooling/releaser -f releaser/Dockerfile releaser
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
Composite:
|
Composite:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
|
- run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ jobs:
|
|||||||
- Composite
|
- Composite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
|
- run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/UnitTesting.yml
vendored
8
.github/workflows/UnitTesting.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: '🟦 Setup MSYS2'
|
- name: '🟦 Setup MSYS2'
|
||||||
if: matrix.system == 'msys2'
|
if: matrix.system == 'msys2'
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🐍 Setup Python ${{ matrix.python }}
|
- name: 🐍 Setup Python ${{ matrix.python }}
|
||||||
if: matrix.system != 'msys2'
|
if: matrix.system != 'msys2'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 📤 Upload 'TestReport.xml' artifact
|
- name: 📤 Upload 'TestReport.xml' artifact
|
||||||
if: inputs.artifact != ''
|
if: inputs.artifact != ''
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}-${{ matrix.system }}-${{ matrix.python }}
|
name: ${{ inputs.artifact }}-${{ matrix.system }}-${{ matrix.python }}
|
||||||
path: TestReport.xml
|
path: TestReport.xml
|
||||||
|
|||||||
6
.github/workflows/VerifyDocs.yml
vendored
6
.github/workflows/VerifyDocs.yml
vendored
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -39,10 +39,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🐍 Setup Python
|
- name: 🐍 Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python_version }}
|
python-version: ${{ inputs.python_version }}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
BIN
ExamplePipeline_light.png
Normal file
BIN
ExamplePipeline_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
@@ -88,9 +88,11 @@ This repository provides 10+ Reusable Workflows based on the CI pipelines of the
|
|||||||
By combining them, Python packages can be continuously tested and released along with Sphinx documentation sites, to GitHub Releases, GitHub Pages and PyPI.
|
By combining them, Python packages can be continuously tested and released along with Sphinx documentation sites, to GitHub Releases, GitHub Pages and PyPI.
|
||||||
Optionally, coverage and static type check reports can be gathered.
|
Optionally, coverage and static type check reports can be gathered.
|
||||||
|
|
||||||
[](ExamplePipeline.png)
|
[](ExamplePipeline_dark.png)
|
||||||
|
|
||||||
As shown in the screenshot above, the expected order is:
|
[](ExamplePipeline_light.png)
|
||||||
|
|
||||||
|
As shown in the screenshots above, the expected order is:
|
||||||
|
|
||||||
- Global:
|
- Global:
|
||||||
- [Parameters](.github/workflows/Parameters.yml): a workaround for the limitations to handle global variables in
|
- [Parameters](.github/workflows/Parameters.yml): a workaround for the limitations to handle global variables in
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -52,7 +52,7 @@ def GetListOfArtifacts(argv, files):
|
|||||||
if len(argv) > 1:
|
if len(argv) > 1:
|
||||||
args += argv[1:]
|
args += argv[1:]
|
||||||
if len(args) == 1 and args[0].lower() == "none":
|
if len(args) == 1 and args[0].lower() == "none":
|
||||||
print("! Skipping 'files' because it's set to 'none")
|
print("! Skipping 'files' because it's set to 'none'.")
|
||||||
return []
|
return []
|
||||||
elif len(args) == 0:
|
elif len(args) == 0:
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
@@ -63,14 +63,14 @@ def GetListOfArtifacts(argv, files):
|
|||||||
print(f" glob({item!s}):")
|
print(f" glob({item!s}):")
|
||||||
for fname in [fname for fname in glob(item, recursive=True) if not Path(fname).is_dir()]:
|
for fname in [fname for fname in glob(item, recursive=True) if not Path(fname).is_dir()]:
|
||||||
if Path(fname).stat().st_size == 0:
|
if Path(fname).stat().st_size == 0:
|
||||||
print(f" - ! Skipping empty file {fname!s}")
|
print(f" - ! Skipping empty file {fname!s}.")
|
||||||
continue
|
continue
|
||||||
print(f" - {fname!s}")
|
print(f" - {fname!s}")
|
||||||
flist.append(fname)
|
flist.append(fname)
|
||||||
if len(flist) < 1:
|
if len(flist) < 1:
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
raise (Exception("Empty list of files to upload/update!"))
|
raise (Exception("Empty list of files to upload/update!"))
|
||||||
return flist
|
return sorted(flist)
|
||||||
|
|
||||||
|
|
||||||
def GetGitHubAPIHandler(token):
|
def GetGitHubAPIHandler(token):
|
||||||
@@ -101,7 +101,7 @@ def CheckRefSemVer(gh_ref, tag, snapshots):
|
|||||||
return (tag, env_tag, False)
|
return (tag, env_tag, False)
|
||||||
elif snapshots:
|
elif snapshots:
|
||||||
# is semver compilant prerelease tag, thus a snapshot (we skip it)
|
# is semver compilant prerelease tag, thus a snapshot (we skip it)
|
||||||
print("! Skipping snapshot prerelease")
|
print("! Skipping snapshot prerelease.")
|
||||||
sys_exit()
|
sys_exit()
|
||||||
|
|
||||||
return (tag, env_tag, True)
|
return (tag, env_tag, True)
|
||||||
@@ -179,12 +179,15 @@ if paramRM:
|
|||||||
asset.delete_asset()
|
asset.delete_asset()
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
|
|
||||||
print("· Cleanup and/or upload artifacts")
|
if len(files) > 0:
|
||||||
env = environ.copy()
|
print("· Upload assets")
|
||||||
env["GITHUB_TOKEN"] = paramToken
|
env = environ.copy()
|
||||||
cmd = ["gh", "release", "upload", "--repo", paramRepo, "--clobber", tag] + files
|
env["GITHUB_TOKEN"] = paramToken
|
||||||
print(f" > {' '.join(cmd)}")
|
cmd = ["gh", "release", "upload", "--repo", paramRepo, "--clobber", tag] + files
|
||||||
check_call(cmd, env=env)
|
print(f" > {' '.join(cmd)}")
|
||||||
stdout.flush()
|
check_call(cmd, env=env)
|
||||||
|
stdout.flush()
|
||||||
|
else:
|
||||||
|
print("! Skipping uploading assets because the file list is empty.")
|
||||||
|
|
||||||
UpdateReference(gh_release, tag, paramSHA if env_tag is None else None, is_prerelease, is_draft)
|
UpdateReference(gh_release, tag, paramSHA if env_tag is None else None, is_prerelease, is_draft)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Unai Martinez-Corral #
|
# Unai Martinez-Corral #
|
||||||
# #
|
# #
|
||||||
# ==================================================================================================================== #
|
# ==================================================================================================================== #
|
||||||
# Copyright 2020-2021 The pyTooling Authors #
|
# Copyright 2020-2022 The pyTooling Authors #
|
||||||
# #
|
# #
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
||||||
# you may not use this file except in compliance with the License. #
|
# you may not use this file except in compliance with the License. #
|
||||||
@@ -37,6 +37,6 @@ inputs:
|
|||||||
default: POST
|
default: POST
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node20'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
post: 'main.js'
|
post: 'main.js'
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* Unai Martinez-Corral *
|
* Unai Martinez-Corral *
|
||||||
* *
|
* *
|
||||||
* ================================================================================================================== *
|
* ================================================================================================================== *
|
||||||
* Copyright 2021 Unai Martinez-Corral <unai.martinezcorral@ehu.eus> *
|
* Copyright 2021-2022 Unai Martinez-Corral <unai.martinezcorral@ehu.eus> *
|
||||||
|
* Copyright 2022 Unai Martinez-Corral <umartinezcorral@antmicro.com> *
|
||||||
* *
|
* *
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); *
|
* Licensed under the Apache License, Version 2.0 (the "License"); *
|
||||||
* you may not use this file except in compliance with the License. *
|
* you may not use this file except in compliance with the License. *
|
||||||
@@ -24,16 +25,14 @@
|
|||||||
* * https://github.com/docker/login-action/issues/72 *
|
* * https://github.com/docker/login-action/issues/72 *
|
||||||
* * https://github.com/actions/runner/issues/1478 *
|
* * https://github.com/actions/runner/issues/1478 *
|
||||||
* ================================================================================================================== */
|
* ================================================================================================================== */
|
||||||
const { exec } = require("child_process");
|
const { spawn } = require("child_process");
|
||||||
|
const { appendFileSync } = require("fs");
|
||||||
|
const { EOL } = require("os");
|
||||||
|
|
||||||
function run(cmd) {
|
function run(cmd) {
|
||||||
exec(cmd, (error, stdout, stderr) => {
|
const subprocess = spawn(cmd, { stdio: "inherit", shell: true });
|
||||||
if ( stdout.length !== 0 ) { console.log(`${stdout}`); }
|
subprocess.on("exit", (exitCode) => {
|
||||||
if ( stderr.length !== 0 ) { console.error(`${stderr}`); }
|
process.exitCode = exitCode;
|
||||||
if (error) {
|
|
||||||
process.exitCode = error.code;
|
|
||||||
console.error(`${error}`);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +41,6 @@ const key = process.env.INPUT_KEY.toUpperCase();
|
|||||||
if ( process.env[`STATE_${key}`] !== undefined ) { // Are we in the 'post' step?
|
if ( process.env[`STATE_${key}`] !== undefined ) { // Are we in the 'post' step?
|
||||||
run(process.env.INPUT_POST);
|
run(process.env.INPUT_POST);
|
||||||
} else { // Otherwise, this is the main step
|
} else { // Otherwise, this is the main step
|
||||||
console.log(`::save-state name=${key}::true`);
|
appendFileSync(process.env.GITHUB_STATE, `${key}=true${EOL}`);
|
||||||
run(process.env.INPUT_MAIN);
|
run(process.env.INPUT_MAIN);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user