-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): migration from Travis CI to github actions
- Loading branch information
1 parent
83e73ab
commit ebadb75
Showing
3 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |