Skip to content

Commit

Permalink
Merge pull request #1 from Deric-W/ci
Browse files Browse the repository at this point in the history
add tests workflow
  • Loading branch information
Deric-W authored Aug 22, 2022
2 parents b63a8c5 + 41b288e commit a83f714
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
49 changes: 49 additions & 0 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on: [push, workflow_dispatch]

jobs:
Test:
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install test dependencies
run: python -m pip install --no-cache-dir mypy coverage build

- name: Run MyPy
run: python -m mypy --cache-dir=/dev/null -p AMN

- name: Build wheel
run: python -m build

- name: Install wheel
run: python -m pip install --no-cache-dir dist/AMN-*.whl

- name: Run tests and generate report
run: coverage run -m unittest discover --verbose

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
flags: ${{ runner.os }}
verbose: true

- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
# Programming
# AMN

## AMN
![Tests](https://github.com/Deric-W/AMN/actions/workflows/Tests.yaml/badge.svg)
[![codecov](https://codecov.io/gh/Deric-W/AMN/branch/main/graph/badge.svg?token=SU3982mC17)](https://codecov.io/gh/Deric-W/AMN)

The AMN package implements a simple virtual machine for the AM0 and AM1 instructions sets.

To use it, simply execute it with `python3 -m AMN -i <instruction set> exec path/to/file.txt` to execute the instructions written in a file.

If you want an interactive console just use `python3 -m AMN -i <instruction set> repl`.

### Requirements
## Requirements

Python >= 3.10 is required to use the utility.

### Examples
## Installation

```sh
python3 -m pip install AMN
```

## Examples

The REPL (read eval print loop) in action:

Expand Down

0 comments on commit a83f714

Please sign in to comment.