-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for building and checking package metadata (#3)
- Loading branch information
1 parent
05a0dbb
commit 459cad5
Showing
2 changed files
with
48 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
requirements_file: | ||
type: "string" | ||
required: false | ||
default: "setup.cfg" | ||
|
||
jobs: | ||
build-and-check: | ||
name: Build and check package metadata | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles(inputs.requirements_file) }} | ||
restore-keys: ${{ runner.os }}-pip | ||
- name: Install dependencies | ||
run: python3 -m pip install --upgrade build twine | ||
- name: Build | ||
run: python3 -m build --sdist --wheel . | ||
- name: Check package metadata | ||
run: twine check --strict dist/* |
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