Skip to content

Commit 79b097b

Browse files
committed
Swap out travis for github actions
1 parent 3bd6b1f commit 79b097b

File tree

5 files changed

+95
-30
lines changed

5 files changed

+95
-30
lines changed

.github/workflows/publish.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@master
15+
- name: Create Release
16+
id: create_release
17+
uses: actions/create-release@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
tag_name: ${{ github.ref }}
22+
release_name: Release ${{ github.ref }}
23+
body: |
24+
Change Log:
25+
draft: true # Give me a moment to fill in the description
26+
prerelease: false
27+
deploy:
28+
name: Deploy Release to PyPI
29+
needs: release
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: Set Up Python
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: '3.7'
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install -U pip
40+
python -m pip install -U setuptools wheel
41+
- name: Build
42+
run: python setup.py sdist bdist_wheel
43+
- name: Publish
44+
uses: pypa/gh-action-pypi-publish@master
45+
with:
46+
user: __token__
47+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
paths:
7+
- '**.py'
8+
schedule:
9+
# Test master every Saturday at midnight to verify dependencies
10+
- cron: '0 0 * * 6'
11+
12+
jobs:
13+
flake8:
14+
name: Flake8
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Set Up Python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: '3.7'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install -U pip
25+
python -m pip install flake8
26+
- name: Check
27+
run: python -m flake8
28+
test:
29+
name: Test
30+
needs: flake8
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
python: ['3.6', '3.7', '3.8']
35+
steps:
36+
- uses: actions/checkout@v1
37+
- name: Set Up Python
38+
uses: actions/setup-python@v1
39+
with:
40+
python-version: ${{ matrix.python }}
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install -U pip
44+
python -m pip install -U -r requirements.txt pytest-coverage codecov
45+
- name: Run Tests
46+
run: python -m pytest --cov=httpx_gssapi --cov-report=xml
47+
# - name: Upload Coverage
48+
# run: python -m codecov --token=${{ secrets.CODECOV_TOKEN }}

.travis.install.sh

-9
This file was deleted.

.travis.sh

-7
This file was deleted.

.travis.yml

-14
This file was deleted.

0 commit comments

Comments
 (0)