Skip to content

Commit de5e89f

Browse files
authored
Switch to GH actions (#143)
1 parent 65c08ef commit de5e89f

File tree

4 files changed

+102
-30
lines changed

4 files changed

+102
-30
lines changed

.github/workflows/main.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
LANG: C.UTF-8
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
container: ghcr.io/apertium/apertium-apy-cicd
16+
strategy:
17+
matrix:
18+
python-version:
19+
- "3.8"
20+
- "3.9"
21+
- "3.10"
22+
# - "3.11"
23+
# - "3.12"
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: pipenv
32+
- name: Install Pipenv
33+
run: python -m pip install pipenv
34+
- name: Install Pip dependencies
35+
run: pipenv install --deploy --dev
36+
37+
- name: Build
38+
run: pipenv run make
39+
40+
- name: Setup Git user
41+
run: git config --global user.email "test@example.com" && git config --global user.name "test"
42+
- name: Test
43+
run: pipenv run make unit-test
44+
lint:
45+
runs-on: ubuntu-latest
46+
container: ghcr.io/apertium/apertium-apy-cicd
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- uses: actions/setup-python@v5
52+
with:
53+
python-version: "3.10"
54+
cache: pipenv
55+
- name: Install Pipenv
56+
run: python -m pip install pipenv
57+
- name: Install Pip dependencies
58+
run: pipenv install --deploy --dev
59+
60+
- name: Build
61+
run: pipenv run make
62+
63+
- name: Lint
64+
run: pipenv run make lint
65+
coverage:
66+
runs-on: ubuntu-latest
67+
container: ghcr.io/apertium/apertium-apy-cicd
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
71+
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: "3.10"
75+
cache: pipenv
76+
- name: Install Pipenv
77+
run: python -m pip install pipenv
78+
- name: Install Pip dependencies
79+
run: pipenv install --deploy --dev
80+
81+
- name: Build
82+
run: pipenv run make
83+
84+
- name: Setup Git user
85+
run: git config --global user.email "test@example.com" && git config --global user.name "test"
86+
- name: Test
87+
run: pipenv run make coverage
88+
89+
- name: Coveralls
90+
run: pipenv run coveralls --service=github
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

-27
This file was deleted.

Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ test-release: all apertium_init.py
2323
./setup.py sdist bdist_wheel
2424
twine upload --sign --repository-url https://test.pypi.org/legacy/ dist/*
2525

26-
test: all
26+
lint: all
2727
flake8 *.py **/*.py
2828
mypy --strict apertium-init.py
29+
30+
unit-test: all
31+
python3 -m unittest --verbose
32+
33+
coverage:
2934
coverage run -m unittest --verbose --buffer
30-
coverage report --show-missing --fail-under 70
35+
coverage report --show-missing
36+
37+
test: lint unit-test coverage
3138

3239
install: all
3340
@install -d $(DESTDIR)$(PREFIX)/bin

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Apertium-Init (a.k.a. Apertium Bootstrap)
22

3-
[![Build Status](https://travis-ci.org/apertium/apertium-init.svg?branch=master)](https://travis-ci.org/apertium/apertium-init)
3+
[![Build Status](https://github.com/apertium/apertium-init/actions/workflows/main.yml/badge.svg)](https://github.com/apertium/apertium-init/actions/workflows/main.yml)
44
[![Coverage Status](https://coveralls.io/repos/github/apertium/apertium-init/badge.svg?branch=master)](https://coveralls.io/github/apertium/apertium-init?branch=master)
55
[![PyPI](https://img.shields.io/pypi/v/apertium-init.svg)](https://pypi.org/project/apertium-init/)
66
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apertium-init.svg)](https://pypi.org/project/apertium-init/)

0 commit comments

Comments
 (0)