Skip to content

Commit

Permalink
Merge branch 'github-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
matwey committed Nov 6, 2022
2 parents 2532253 + eaaaf78 commit 66181a1
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 43 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
push:
tags:
- '*'

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Python

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
construct-version: [">=2.9,<2.10", ">=2.10,<2.11"]
exclude:
- python-version: "2.7"
construct-version: ">=2.10,<2.11"

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install 'construct${{ matrix.construct-version }}'
pip install -r requirements.txt
- name: Run Tests
run: |
python setup.py test
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/matwey/pybeam.svg?branch=master)](https://travis-ci.org/matwey/pybeam)
[![Python](https://github.com/matwey/pybeam/actions/workflows/python.yml/badge.svg)](https://github.com/matwey/pybeam/actions/workflows/python.yml)
[![PyPI version](https://badge.fury.io/py/pybeam.svg)](https://badge.fury.io/py/pybeam)
[![Documentation Status](https://readthedocs.org/projects/pybeam/badge/?version=latest)](http://pybeam.readthedocs.io/en/latest/?badge=latest)

Expand Down

0 comments on commit 66181a1

Please sign in to comment.