Skip to content

Commit

Permalink
Set up GitHub Actions
Browse files Browse the repository at this point in the history
Replacing Travis CI
  • Loading branch information
2xB committed Sep 18, 2022
1 parent 3092cc8 commit 81ff435
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 15 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test and publish

on:
release:
types: [published]

# The following is based on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ .
jobs:
test:
strategy:
matrix:
pyversion: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest]
name: Test Faultguard using Python ${{ matrix.pyversion }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.pyversion }}
- name: Install requirements
run: >-
python -m
pip install
pytest
numpy
--user
- name: Run pytest
run: pytest
publish:
name: Publish Faultguard
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TOKEN_PYPI }}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

0 comments on commit 81ff435

Please sign in to comment.