-
Notifications
You must be signed in to change notification settings - Fork 139
62 lines (58 loc) · 1.63 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: test
on:
- push
- pull_request
jobs:
build:
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9.18, 3.10.11, 3.11.3, pypy3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq toilet figlet
sudo mkdir -p /usr/local/share/pyfiglet/
sudo chmod 777 /usr/local/share/pyfiglet/
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
make full
python setup.py install
- name: Test with test.py
run: |
./pyfiglet/test.py
- name: Test with pytest
run: |
pytest -vv
pypi-publish:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: publish
url: https://pypi.org/p/pyfiglet
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11.3
uses: actions/setup-python@v4
with:
python-version: 3.11.3
cache: pip
- name: Build full dist
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
make full
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1