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 1515# SPDX-License-Identifier: Apache-2.0
1616# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
1717
18- name : Build and Deploy
18+ name : Build and Publish
1919
2020on :
21+ workflow_run :
22+ workflows :
23+ - Validation
24+ types :
25+ - completed
2126 workflow_dispatch :
2227 push :
2328 tags :
24- - ' v*.* '
29+ - ' v*'
2530 paths-ignore :
2631 - ' **.md'
2732 pull_request :
28- branches : [ main ]
2933 paths-ignore :
3034 - ' **.md'
3135
3236jobs :
33- build :
34- name : Build OrtHW python with Poetry
37+ build_deploy :
38+ name : Build and Deploy Python OrtHW
3539 runs-on : ubuntu-latest
3640
3741 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
4047 with :
4148 python-version : ' 3.10'
42- cache : ' pip'
43- - run : |
44- pip install poetry
49+ cache : ' poetry'
50+
51+ - name : Setup poetry project
52+ run : |
4553 poetry install -q
4654 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 1515# SPDX-License-Identifier: Apache-2.0
1616# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
1717
18- name : Commit Checks
18+ name : Validation
1919
2020on :
2121 workflow_dispatch :
2222 pull_request :
23- branches : [main]
2423 paths-ignore :
2524 - ' **.md'
25+ push :
26+ branches : [main]
2627
2728jobs :
2829 build :
29- name : Validade Pull Request Commits
30+ name : Validate Commit
3031 runs-on : ubuntu-latest
3132
3233 steps :
33- - uses : actions/checkout@v3
34- 35- - uses : apache/skywalking-eyes/header@main
34+ - uses : actions/checkout@v4
35+ 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
103103# This is especially recommended for binary packages to ensure reproducibility, and is more
104104# commonly ignored for libraries.
105105# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106- poetry.lock
106+ # poetry.lock
107107
108108# pdm
109109# 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
22#
33# Licensed under the Apache License, Version 2.0 (the "License");
44# you may not use this file except in compliance with the License.
1919header :
2020 license :
2121 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 '
2424 software-name : orthw
2525 pattern : |
2626 Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,13 +38,11 @@ header:
3838 SPDX-License-Identifier: Apache-2.0
3939 License-Filename: LICENSE
4040
41+ Copyright \(c\) 20(23|24) The ORTHW Project Authors
42+
4143 paths :
4244 - ' **/*.py'
4345
4446 comment : on-failure
4547
4648 license-location-threshold : 80
47-
48- dependency :
49- files :
50- - package.json
Original file line number Diff line number Diff line change 99 - id : check-added-large-files
1010
1111 - repo : https://github.com/pre-commit/mirrors-mypy
12- rev : v1.10.0
12+ rev : v1.10.1
1313 hooks :
1414 - id : mypy
1515 additional_dependencies :
1616 - pydantic
1717 - types-PyYaml==6.0
1818 - types-toml
19+ - types-requests
1920 args : [--config, pyproject.toml]
2021
2122 - repo : https://github.com/charliermarsh/ruff-pre-commit
22- rev : " v0.4.9 "
23+ rev : " v0.4.10 "
2324 hooks :
2425 - id : ruff
2526 args : [ --fix ]
You can’t perform that action at this time.
0 commit comments