Skip to content

Commit 6f361eb

Browse files
committed
Use GitHub actions instead of Travis-CI
1 parent 9dee014 commit 6f361eb

File tree

7 files changed

+58
-39
lines changed

7 files changed

+58
-39
lines changed

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[run]
2+
source = javaobj/
3+
4+
[report]
5+
include = javaobj/*

.coveralls.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI Build
5+
6+
on:
7+
push:
8+
branches: '**'
9+
tags: '**'
10+
pull_request:
11+
branches: '**'
12+
13+
jobs:
14+
build:
15+
timeout-minutes: 10
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install flake8 pytest coverage
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
- name: Lint with flake8
34+
run: |
35+
# stop the build if there are Python syntax errors or undefined names
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
# exit-zero treats all errors as warnings.
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=110 --statistics
39+
- name: Test
40+
run: |
41+
coverage run -m pytest
42+
- name: Coveralls
43+
env:
44+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
45+
run: |
46+
pip install coveralls
47+
coveralls

.travis.yml

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

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
# javaobj-py3
22

3-
<p>
4-
<a href="https://pypi.python.org/pypi/javaobj-py3/">
5-
<img src="https://img.shields.io/pypi/v/javaobj-py3.svg" alt="Latest Version" />
6-
<img src="https://img.shields.io/pypi/l/javaobj-py3.svg" alt="License" />
7-
</a>
8-
<a href="https://travis-ci.org/tcalmant/python-javaobj">
9-
<img src="https://travis-ci.org/tcalmant/python-javaobj.svg?branch=master"
10-
alt="Travis-CI status" />
11-
</a>
12-
<a href="https://coveralls.io/r/tcalmant/python-javaobj?branch=master">
13-
<img src="https://coveralls.io/repos/tcalmant/python-javaobj/badge.svg?branch=master"
14-
alt="Coveralls status" />
15-
</a>
16-
</p>
3+
[![Latest Version](https://img.shields.io/pypi/v/javaobj-py3.svg)](https://pypi.python.org/pypi/javaobj-py3/)
4+
[![License](https://img.shields.io/pypi/l/javaobj-py3.svg)](https://pypi.python.org/pypi/javaobj-py3/)
5+
[![CI Build](https://github.com/tcalmant/python-javaobj/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/tcalmant/python-javaobj/actions/workflows/build.yml)
6+
[![Coveralls status](https://coveralls.io/repos/tcalmant/python-javaobj/badge.svg?branch=master)](https://coveralls.io/r/tcalmant/python-javaobj?branch=master)
177

188
*python-javaobj* is a python library that provides functions for reading and
199
writing (writing is WIP currently) Java objects serialized or will be
File renamed without changes.
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,18 @@
3434
# Standard library
3535
import logging
3636
import os
37+
import struct
3738
import subprocess
3839
import sys
3940
import unittest
40-
import struct
41-
4241
from io import BytesIO
4342

4443
# Prepare Python path to import javaobj
4544
sys.path.insert(0, os.path.abspath(os.path.dirname(os.getcwd())))
4645

46+
import javaobj.v2 as javaobj
4747
# Local
4848
from javaobj.utils import bytes_char, java_data_fd
49-
import javaobj.v2 as javaobj
5049

5150
# ------------------------------------------------------------------------------
5251

@@ -57,8 +56,6 @@
5756

5857
# ------------------------------------------------------------------------------
5958

60-
# ------------------------------------------------------------------------------
61-
6259
# Custom writeObject parsing classes
6360
class CustomWriterInstance(javaobj.beans.JavaInstance):
6461
def __init__(self):

0 commit comments

Comments
 (0)