Skip to content

Commit

Permalink
Add env variable github token 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Nov 17, 2020
1 parent e48f992 commit f5d00df
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/python-package.yml
Expand Up @@ -3,48 +3,48 @@

name: Python package

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [ 3.6, 3.7, 3.8 ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --use-feature=2020-resolver -e .[dev]
pip install coverage coveralls
- name: Download test data
run: |
cd data
python download_test_files.py && cd ..
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
coverage run --branch -m py.test --basetemp={envtmpdir}
export PHASESPACE_EAGER=1
coverage run --branch -m py.test --basetemp={envtmpdir}
export PHASESPACE_EAGER=0 # reset
- name: Coveralls GitHub Action
run: |
coveralls
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --use-feature=2020-resolver -e .[dev]
pip install coverage coveralls
- name: Download test data
run: |
cd data
python download_test_files.py && cd ..
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
coverage run --branch -m py.test --basetemp={envtmpdir}
export PHASESPACE_EAGER=1
coverage run --branch -m py.test --basetemp={envtmpdir}
export PHASESPACE_EAGER=0 # reset
- name: Coveralls GitHub Action
run: |
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f5d00df

Please sign in to comment.