Skip to content

Commit c842e70

Browse files
authored
Merge pull request #1 from Deric-W/ci
Add CI
2 parents 44bf110 + fd2360e commit c842e70

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

.github/codecov.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
informational: true
6+
patch:
7+
default:
8+
informational: true

.github/workflows/Tests.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
Test:
7+
strategy:
8+
matrix:
9+
python-version: ["3.10"]
10+
os: [ubuntu-latest]
11+
12+
runs-on: ${{ matrix.os }}
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install test dependencies
24+
run: python -m pip install --no-cache-dir mypy coverage build
25+
26+
- name: Run MyPy
27+
run: python -m mypy --cache-dir=/dev/null -p lambda_calculus
28+
29+
- name: Build wheel
30+
run: python -m build
31+
32+
- name: Install wheel
33+
run: python -m pip install --no-cache-dir dist/lambda_calculus-*.whl
34+
35+
- name: Run tests and generate report
36+
run: coverage run -m unittest discover --verbose
37+
38+
- name: Upload coverage
39+
uses: codecov/codecov-action@v3
40+
with:
41+
flags: ${{ runner.os }}
42+
verbose: true
43+
44+
- name: Publish package
45+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
with:
48+
password: ${{ secrets.PYPI_API_TOKEN }}
49+
verbose: true

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# lambda_calculus
22

3+
![Tests](https://github.com/Deric-W/lambda_calculus/actions/workflows/Tests.yaml/badge.svg)
4+
[![codecov](https://codecov.io/gh/Deric-W/lambda_calculus/branch/main/graph/badge.svg?token=SU3982mC17)](https://codecov.io/gh/Deric-W/lambda_calculus)
5+
36
The `lambda_calculus` package contains classes which implement basic operations of the lambda calculus.
47

58
To use it, simply import the classes `Variable`, `Abstraction` and `Application` from this package

0 commit comments

Comments
 (0)