Skip to content

Commit

Permalink
Merge pull request #158 from deanishe/ci/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Action for CI
  • Loading branch information
deanishe authored May 20, 2020
2 parents 8a1b04f + 1d907de commit 0e705a2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "build"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
run:
name: "tests & coverage"
runs-on: macos-latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 2.7

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Lint
run: ./run-tests.sh -l

- name: Unit tests
run: ./run-tests.sh

- name: Install coverage dependencies
run: pip install -r requirements-ci.txt

- name: Codacy
run: python-codacy-coverage -r coverage.xml -c ${{ github.sha }} || exit 0

- name: Coveralls
run: coveralls || exit 0

- name: Codecov
run: bash <(curl -s https://codecov.io/bash) || exit 0
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ Alfred-Workflow

A helper library in Python for authors of workflows for [Alfred 3 and 4][alfred].

[![Build Status][shield-travis]][travis] [![Coverage Status][shield-coveralls]][coveralls] [![Latest Version][shield-version]][pypi] [![Development Status][shield-status]][pypi] [![Supported Python Versions][shield-pyversions]][pypi]
<!-- [![Build Status][shield-travis]][travis] -->
[![Build Status][shield-github]][action-github]
[![Coverage Status][shield-coveralls]][coveralls]
[![Development Status][shield-status]][pypi]
[![Latest Version][shield-version]][pypi]
[![Supported Python Versions][shield-pyversions]][pypi]

<!-- [![Downloads][shield-download]][pypi] -->

Expand Down Expand Up @@ -335,6 +340,8 @@ Workflows using Alfred-Workflow
[shield-coveralls]: https://coveralls.io/repos/github/deanishe/alfred-workflow/badge.svg?branch=master
[shield-docs]: https://readthedocs.org/projects/alfredworkflow/badge/?version=latest&style=flat
[shield-download]: https://img.shields.io/pypi/dm/Alfred-Workflow.svg?style=flat
[shield-github]: https://github.com/deanishe/alfred-workflow/workflows/build/badge.svg
[action-github]: https://github.com/deanishe/alfred-workflow/actions?query=workflow%3Abuild
[shield-health]: https://landscape.io/github/deanishe/alfred-workflow/master/landscape.png?style=flat
[shield-licence]: https://pypip.in/license/Alfred-Workflow/badge.svg?style=flat
[shield-status]: https://img.shields.io/pypi/status/Alfred-Workflow.svg?style=flat
Expand Down
2 changes: 1 addition & 1 deletion tests/test_util_lockfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_concurrent_access(paths):
assert not os.path.exists(paths.lockfile)

with open(paths.testfile) as fp:
lines = [l.strip() for l in fp.readlines()]
lines = [line.strip() for line in fp.readlines()]

for line in lines:
assert len(set(line)) == 1
Expand Down

0 comments on commit 0e705a2

Please sign in to comment.