Skip to content

Commit

Permalink
Merge pull request #648 from oduwsdl/issue-630
Browse files Browse the repository at this point in the history
Add GH Workflow for cross-platform tests
  • Loading branch information
machawk1 authored May 18, 2020
2 parents 28c76fa + ec0d17a commit 43936d2
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build

on:
- push
- pull_request

jobs:
build-image:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
name: Docker Image
steps:
- uses: actions/checkout@master
- name: Lint, Test, and Build Image
run: docker image build .
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on:
- push
- pull_request

jobs:
lint:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
name: Py and JS
steps:
- uses: actions/checkout@master
- name: Lint JavaScript
run: |
npm install standard
node_modules/.bin/standard
- name: Lint Python
run: |
pip install --user pycodestyle
python -m pycodestyle
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
- push
- pull_request

jobs:
matrix-test:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
python:
- 3.7
- 3.8
ipfs:
- 0.4
- 0.5
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Py-${{ matrix.python }} IPFS-${{ matrix.ipfs }}
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Set up IPFS ${{ matrix.ipfs }}
uses: ibnesayeed/setup-ipfs@master
with:
ipfs_version: ${{ matrix.ipfs }}
run_daemon: true
- name: Install Python Dependencies
shell: bash
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Run Tests
shell: bash
run: py.test -s --cov=./
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_TAG=3.7
ARG PYTHON_TAG=3
FROM python:${PYTHON_TAG} AS base

# Add some metadata
Expand Down

0 comments on commit 43936d2

Please sign in to comment.