-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: add two workflows, test and release. #13
- Loading branch information
1 parent
889e291
commit 35b4578
Showing
2 changed files
with
70 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,38 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install build dependencies | ||
run: | | ||
pip install --user pipenv | ||
pipenv sync | ||
- name: Build | ||
run: pipenv run python -m build . | ||
|
||
- name: Publish | ||
run: echo TODO | ||
|
||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# skip-existing: true |
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,32 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
python: ['3.12'] | ||
platform: [ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install test dependencies | ||
run: | | ||
pip install --user pipenv | ||
pipenv sync | ||
- name: Test | ||
run: | | ||
PYTHONPATH=./src pipenv run python -m unittest discover tests/snescpu |