File tree Expand file tree Collapse file tree 12 files changed +2145
-64
lines changed Expand file tree Collapse file tree 12 files changed +2145
-64
lines changed Original file line number Diff line number Diff line change 15
15
# SPDX-License-Identifier: Apache-2.0
16
16
# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
17
17
18
- name : Build and Deploy
18
+ name : Build and Publish
19
19
20
20
on :
21
+ workflow_run :
22
+ workflows :
23
+ - Validation
24
+ types :
25
+ - completed
21
26
workflow_dispatch :
22
27
push :
23
28
tags :
24
- - ' v*.* '
29
+ - ' v*'
25
30
paths-ignore :
26
31
- ' **.md'
27
32
pull_request :
28
- branches : [ main ]
29
33
paths-ignore :
30
34
- ' **.md'
31
35
32
36
jobs :
33
- build :
34
- name : Build OrtHW python with Poetry
37
+ build_deploy :
38
+ name : Build and Deploy Python OrtHW
35
39
runs-on : ubuntu-latest
36
40
37
41
steps :
38
- - uses : actions/checkout@v3
39
- - uses : actions/setup-python@v4
42
+ - uses : actions/checkout@v4
43
+
44
+ - name : Install poetry
45
+ run : pipx install poetry
46
+ - uses : actions/setup-python@v5
40
47
with :
41
48
python-version : ' 3.10'
42
- cache : ' pip'
43
- - run : |
44
- pip install poetry
49
+ cache : ' poetry'
50
+
51
+ - name : Setup poetry project
52
+ run : |
45
53
poetry install -q
46
54
poetry build
47
- deploy :
48
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
49
- name : Deploy
50
- runs-on : ubuntu-latest
51
-
52
- steps :
53
- - run : |
54
- echo "Deployment is not implemented yet"
55
+
56
+ - name : Check 📦 package
57
+ run : |
58
+ poetry run twine check dist/*
59
+
60
+ - name : Upload artifacts
61
+ uses : actions/upload-artifact@v4
62
+ with :
63
+ name : build-artifacts
64
+ path : dist/*
65
+
66
+ - name : Publish 📦 package
67
+ if : github.event_name == 'push'
68
+ env :
69
+ TWINE_USERNAME : ${{ secrets.TEST_PYPI_USER }}
70
+ TWINE_PASSWORD : ${{ secrets.TEST_PYPI_TOKEN }}
71
+ run : poetry run twine upload -r testpypi dist/*
Original file line number Diff line number Diff line change 15
15
# SPDX-License-Identifier: Apache-2.0
16
16
# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
17
17
18
- name : Commit Checks
18
+ name : Validation
19
19
20
20
on :
21
21
workflow_dispatch :
22
22
pull_request :
23
- branches : [main]
24
23
paths-ignore :
25
24
- ' **.md'
25
+ push :
26
+ branches : [main]
26
27
27
28
jobs :
28
29
build :
29
- name : Validade Pull Request Commits
30
+ name : Validate Commit
30
31
runs-on : ubuntu-latest
31
32
32
33
steps :
33
- - uses : actions/checkout@v3
34
- - uses : webiny/action-conventional-commits@v1.1.0
35
- - uses : apache/skywalking-eyes/header@main
34
+ - uses : actions/checkout@v4
35
+ - uses : webiny/action-conventional-commits@v1.3.0
36
+ # - uses: apache/skywalking-eyes/header@main
37
+
38
+ - name : Install poetry
39
+ run : pipx install poetry
40
+
41
+ - uses : actions/setup-python@v5
42
+ with :
43
+ python-version : ' 3.10'
44
+ cache : ' poetry'
45
+ - run :
46
+ poetry install -q
47
+ - name : MyPy static check
48
+ run : |
49
+ poetry run mypy --config-file pyproject.toml .
50
+ - name : Ruff Linting
51
+ run : |
52
+ poetry install
53
+ poetry run ruff check --config pyproject.toml .
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ ipython_config.py
103
103
# This is especially recommended for binary packages to ensure reproducibility, and is more
104
104
# commonly ignored for libraries.
105
105
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
- poetry.lock
106
+ # poetry.lock
107
107
108
108
# pdm
109
109
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Original file line number Diff line number Diff line change 1
- # Copyright (C) 2023 The ORTHW Project Authors
1
+ # Copyright 2023 The ORTHW Project Authors
2
2
#
3
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
4
# you may not use this file except in compliance with the License.
19
19
header :
20
20
license :
21
21
spdx-id : Apache-2.0
22
- copyright-owner : The ORTHW Project Authors (see <https://github.com/oss-review-toolkit/orthw/blob/main/NOTICE>)
23
- copyright-year : 2017
22
+ copyright-owner : The ORTHW Project Authors
23
+ copyright-year : ' 2023 '
24
24
software-name : orthw
25
25
pattern : |
26
26
Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,13 +38,11 @@ header:
38
38
SPDX-License-Identifier: Apache-2.0
39
39
License-Filename: LICENSE
40
40
41
+ Copyright \(c\) 20(23|24) The ORTHW Project Authors
42
+
41
43
paths :
42
44
- ' **/*.py'
43
45
44
46
comment : on-failure
45
47
46
48
license-location-threshold : 80
47
-
48
- dependency :
49
- files :
50
- - package.json
Original file line number Diff line number Diff line change 9
9
- id : check-added-large-files
10
10
11
11
- repo : https://github.com/pre-commit/mirrors-mypy
12
- rev : v1.10.0
12
+ rev : v1.10.1
13
13
hooks :
14
14
- id : mypy
15
15
additional_dependencies :
16
16
- pydantic
17
17
- types-PyYaml==6.0
18
18
- types-toml
19
+ - types-requests
19
20
args : [--config, pyproject.toml]
20
21
21
22
- repo : https://github.com/charliermarsh/ruff-pre-commit
22
- rev : " v0.4.9 "
23
+ rev : " v0.4.10 "
23
24
hooks :
24
25
- id : ruff
25
26
args : [ --fix ]
You can’t perform that action at this time.
0 commit comments