Skip to content

Commit eb48647

Browse files
Migrate CI from Travis CI to GitHub Actions.
1 parent 3db2c11 commit eb48647

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

.coveralls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
service_name: travis-pro
1+
service_name: github

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest]
16+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.9', 'pypy-3.10']
17+
include:
18+
# Add spot checks on macOS and Windows for latest and oldest supported
19+
- os: macos-latest
20+
python-version: '3.8'
21+
- os: macos-latest
22+
python-version: '3.13'
23+
- os: windows-latest
24+
python-version: '3.8'
25+
- os: windows-latest
26+
python-version: '3.13'
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
cache: 'pip'
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install pytest pytest-cov coveralls
41+
42+
- name: Run tests with coverage
43+
run: |
44+
pytest tests/ --cov=neat --cov-report=term --cov-report=xml -v
45+
46+
- name: Upload coverage to Coveralls
47+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: |
51+
coveralls --service=github

0 commit comments

Comments
 (0)