-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: GitHub action for checks (linting, docstrings...) #29546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
814f5e0
WIP/CI: Draft of GitHub action for web and docs
datapythonista 7ba98c6
Removing failing apt install, and adding artifacts
datapythonista 60facf6
Setting environemnt variables
datapythonista 601d13e
Trying to fix event trigger and env variables
datapythonista 7ccb366
Fixing PATH env variable manually
datapythonista 4dc4e4e
Fixing typo (steps keyword previously removed by mistake)
datapythonista ac1ea2b
Adding checks job, and testing env variables
datapythonista 3e1ff9a
Testing how env variables work
datapythonista d2e3347
Testing how env variables work
datapythonista fcd7282
More env tests, and adding path
datapythonista 6f7a8e2
More env tests
datapythonista 253cdde
Removing env tests
datapythonista 5f5e0bd
Adding jobs to test output and requests post
datapythonista f84e198
Adding missing runs-on properties
datapythonista 5788c14
Fixing errors in showing output and requesting url
datapythonista 9f8264b
Merge remote-tracking branch 'upstream/master' into github_actions
b704bde
Removing tests
datapythonista 8ab4074
Adding debug info to see why detected version is 0.15
datapythonista 2a76a85
Adding lots of traces to identify where the version is coming from
datapythonista 0703635
Reverting version traces
datapythonista c06e6b6
Showing more git info
datapythonista 55664e8
Trying to fetch tags after the checkout
datapythonista 62b21ca
Removing most of versions/tags info, should work now that tags have b…
datapythonista 4922b3a
Removing all debug info
datapythonista 3475e02
Merge remote-tracking branch 'upstream/master' into github_actions
datapythonista 47aa9a5
Merge remote-tracking branch 'upstream/master' into github_actions
datapythonista 0348a24
Adding debug information on exit codes
datapythonista 4b723ed
Temporary removing failure on ipython code blocks
datapythonista 24ddef6
Adding missing params to upload artifact
datapythonista 51a454a
Merge remote-tracking branch 'upstream/master' into github_actions
datapythonista f4ad34b
Revert "Temporary removing failure on ipython code blocks"
datapythonista 975dc7f
Merge remote-tracking branch 'upstream/master' into github_actions
datapythonista a6c9242
displaying exit status of sphinx and ipython validation separately
datapythonista 0ae8d54
Renaming action name for now
datapythonista d0e9319
Renaming, and adding traces to find out the cause of the failure
datapythonista a1cd094
Removing docs build, adding to actions checks build for now
datapythonista 980e824
Fixing typo in typing step, and removing activate action
datapythonista 4aebdf2
Merge from master
datapythonista File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,103 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
|
||
env: | ||
ENV_FILE: environment.yml | ||
# TODO: remove export PATH=... in each step once this works | ||
# PATH: $HOME/miniconda3/bin:$PATH | ||
|
||
jobs: | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Looking for unwanted patterns | ||
run: ci/code_checks.sh patterns | ||
if: true | ||
|
||
- name: Setup environment and build pandas | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
ci/setup_env.sh | ||
if: true | ||
|
||
- name: Linting | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh lint | ||
if: true | ||
|
||
- name: Dependencies consistency | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh dependencies | ||
if: true | ||
|
||
- name: Checks on imported code | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh code | ||
if: true | ||
|
||
- name: Running doctests | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh doctests | ||
if: true | ||
|
||
- name: Docstring validation | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh docstrings | ||
if: true | ||
|
||
- name: Typing validation | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
ci/code_checks.sh docstrings | ||
if: true | ||
|
||
- name: Testing docstring validation script | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
pytest --capture=no --strict scripts | ||
if: true | ||
|
||
- name: Running benchmarks | ||
run: | | ||
export PATH=$HOME/miniconda3/bin:$PATH | ||
source activate pandas-dev | ||
cd asv_bench | ||
asv check -E existing | ||
git remote add upstream https://github.com/pandas-dev/pandas.git | ||
git fetch upstream | ||
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then | ||
asv machine --yes | ||
ASV_OUTPUT="$(asv dev)" | ||
if [[ $(echo "$ASV_OUTPUT" | grep "failed") ]]; then | ||
echo "##vso[task.logissue type=error]Benchmarks run with errors" | ||
echo "$ASV_OUTPUT" | ||
exit 1 | ||
else | ||
echo "Benchmarks run without errors" | ||
fi | ||
else | ||
echo "Benchmarks did not run, no changes detected" | ||
fi | ||
if: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this right? do we have a separate code checks for typing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I guess I copy-pasted incorrectly while transforming the yaml.
Fixed. I also remove the activate action here, which is not needed anymore now that actions is already active, and new actions are executed in PRs.