Skip to content

Commit f6744fc

Browse files
author
Nikos Vasileiou
authored
Merge pull request #42 from transifex/github-actions
Migrate CI to GitHub Actions
2 parents e428f58 + c3fc801 commit f6744fc

4 files changed

Lines changed: 54 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test suite
2+
3+
on:
4+
pull_request:
5+
branches: [ devel ]
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
quality-checks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Code quality checks
16+
run: |
17+
docker build --build-arg PYTHON_VERSION=3.6 --build-arg DJANGO_VERSION=1.11 -t native -f Dockerfile-tmpl .
18+
docker run --rm native sh -c 'pre-commit run --files $(git ls-files transifex* tests*)'
19+
20+
python2-tests:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Test py2.7-dj1.11
25+
run: |
26+
docker build --build-arg PYTHON_VERSION=2.7 --build-arg DJANGO_VERSION=1.11 -t native -f Dockerfile-tmpl .
27+
docker run -e CODECOV_TOKEN=$CODECOV_TOKEN --rm native sh -c 'pytest --cov --cov-report=term-missing && codecov'
28+
env:
29+
CODECOV_TOKEN: ${{secrets.codecov_token}}
30+
31+
python3-tests:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Test py3.6-dj1.11
36+
run: |
37+
docker build --build-arg PYTHON_VERSION=3.6 --build-arg DJANGO_VERSION=1.11 -t native -f Dockerfile-tmpl .
38+
docker run -e CODECOV_TOKEN=$CODECOV_TOKEN --rm native sh -c 'pytest --cov --cov-report=term-missing && codecov'
39+
env:
40+
CODECOV_TOKEN: ${{secrets.codecov_token}}
41+
42+
publish-pypi:
43+
needs: [quality-checks, python2-tests, python3-tests]
44+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Publish package
49+
uses: pypa/gh-action-pypi-publish@master
50+
with:
51+
user: __token__
52+
password: ${{secrets.PYPI_API_TOKEN}}

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[![Build Status](https://travis-ci.org/transifex/transifex-python.svg?branch=master)](https://travis-ci.org/transifex/transifex-python)
21
[![codecov](https://codecov.io/gh/transifex/transifex-python/branch/master/graph/badge.svg)](https://codecov.io/gh/transifex/transifex-python)
32

43
# Transifex Python Toolkit

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Releasing to PyPI
22

3-
Releasing to PyPI happens via the [travis](https://travis-ci.org) integration.
3+
Releasing to PyPI happens via Github Actions CI.
44
In order for a PyPI deployment to occur, a new tag must be pushed to the
55
`master` branch. So, if you have setup your git to push to
66
[this reposository](https://github.com/transifex/transifex-python), in order to
@@ -18,7 +18,7 @@ git push origin <next-version>
1818
We use the [SemVer](https://semver.org/) specification:
1919

2020
> Given a version number MAJOR.MINOR.PATCH, increment the:
21-
>
21+
>
2222
> 1. MAJOR version when you make incompatible API changes,
2323
> 2. MINOR version when you add functionality in a backwards compatible manner,
2424
> and

0 commit comments

Comments
 (0)