Skip to content
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

CI: Setting path only once in GitHub Actions #29867

Merged
merged 2 commits into from
Nov 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:

env:
ENV_FILE: environment.yml
# TODO: remove export PATH=... in each step once this works
# PATH: $HOME/miniconda3/bin:$PATH

jobs:
checks:
Expand All @@ -20,68 +18,61 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Setting conda path
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity what is the syntax here? :: evaulates this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a GitHub actions convention, named annotations. The idea is to output that in the job logs, and GitHub is able to understand it and perform an action based on what we output. Another one would be starting a line with ##[error] which GitHub understands as an error and highlights (and counts) them.

I need to follow up with GitHub to understand it better and see if they have docs, but this one is the syntax to change the PATH (or any other environment variable I assume) in a way that persists to next steps of the job.


- 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
run: 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 typing
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
Expand Down