Skip to content

Commit

Permalink
fix(ci): migration from Travis CI to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Jan 26, 2021
1 parent 83e73ab commit ebadb75
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 30 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release
on: [push, pull_request]

jobs:
test:
name: Test Job
# Support [skip ci] out of box with github actions Workaround
# Only works for push https://github.com/actions/runner/issues/774
if: github.event_name == 'pull_request' || (github.event_name == 'push' && contains(toJson(github.event.commits), '[skip ci]') == false)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install dependencies
run: |
pip install --upgrade pip
pip -V
pip install -r requirements.txt --user
- name: Validate & Coverage Report
run: "./scripts/pep8check.sh"
- name: Setup NodeJS LTS
uses: actions/setup-node@v2
- name: Install dependencies
run: |
npm prune && npm i
- name: Run test/validation
run: |
npm run lint
npm run test --silent >/dev/null
release:
name: Release Job
runs-on: ubuntu-latest
needs:
- test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup NodeJS LTS
uses: actions/setup-node@v2
- name: Install dependencies
run: |
npm prune && npm i
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: npx semantic-release
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
autopep8~=1.5
pep8~=1.7
pip~=20.0
pycodestyle~=2.5
pycodestyle~=2.6

0 comments on commit ebadb75

Please sign in to comment.