Skip to content

Commit

Permalink
Switch from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Wang committed Nov 8, 2020
1 parent 052eeee commit 4a951b0
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 34 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.python.org/devguide/#status-of-python-branches
python-version: [3.6, 3.7, 3.8]
env:
- VERSION=2.9.2 MD5=82db6a62febd8c2976d75b8bd5513315
- VERSION=3.2.1 MD5=489ceea09aa6c78bde5c2241f9da742d

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-java@v1
with:
# https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
java-version: 8
- name: Cache download
uses: actions/cache@v2
env:
cache-name: cache-download
with:
path: download
key: ${{ matrix.env }}
- name: Install HDFS
run: ${{ matrix.env }} ./install-hdfs.sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install --upgrade -r dev_requirements.txt
- name: pytest
run: PATH=hadoop/bin:$PATH PYTHONHASHSEED=random pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Python 3 is required.
Development testing
===================

.. image:: https://travis-ci.org/jingw/pyhdfs.svg?branch=master
:target: https://travis-ci.org/jingw/pyhdfs
.. image:: https://github.com/jingw/pyhdfs/workflows/CI/badge.svg
:target: https://github.com/jingw/pyhdfs/actions?query=workflow%3ACI

.. image:: http://codecov.io/github/jingw/pyhdfs/coverage.svg?branch=master
:target: http://codecov.io/github/jingw/pyhdfs?branch=master
Expand Down
2 changes: 1 addition & 1 deletion install-hdfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi
mkdir -p hadoop
tar -xzf "$tgz" -C hadoop --strip-components 1

cp travis-hdfs-conf/* hadoop/etc/hadoop
cp test-hdfs-conf/* hadoop/etc/hadoop

hadoop/bin/hdfs namenode -format
hadoop/bin/hdfs namenode > namenode.log 2>&1 &
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions travis-hdfs-conf/hadoop-env.sh

This file was deleted.

0 comments on commit 4a951b0

Please sign in to comment.