Skip to content

Commit

Permalink
workflows: add two workflows, test and release. #13
Browse files Browse the repository at this point in the history
  • Loading branch information
showa-yojyo committed Oct 17, 2024
1 parent 889e291 commit 35b4578
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
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

0 comments on commit 35b4578

Please sign in to comment.