enhancement: update main yml
Pip caching option is added.
@@ -22,9 +22,35 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
+ # Cache the pip requirmenets for other tests. If requirements cached use them to speed up the build.
+ # Ref: https://github.com/actions/cache/blob/main/examples.md#python---pip
+ - uses: actions/cache@v2
+ if: startsWith(runner.os, 'Linux')
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+
+ - uses: actions/cache@v2
+ if: startsWith(runner.os, 'macOS')
+ with:
+ path: ~/Library/Caches/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+
+ - uses: actions/cache@v2
+ if: startsWith(runner.os, 'Windows')
+ with:
+ path: ~\AppData\Local\pip\Cache
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+
# Runs a single command using the runners shell
- name: Run a one-line script
- run: echo Hello, world!
+ run: echo Hello, world! Welcome PyElastica Build, let's start testing!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
