-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further condensing
uses
statments into 1 action
- Loading branch information
1 parent
1984c4d
commit 6ed0cc1
Showing
2 changed files
with
7 additions
and
8 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 |
---|---|---|
|
@@ -4,19 +4,26 @@ description: Set up an anaconda-linter environment | |
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
- name: Cache conda env | ||
id: cache-conda | ||
uses: actions/[email protected] | ||
env: | ||
cache-name: conda-env-cache | ||
with: | ||
cache: 'pip' | ||
path: '/usr/share/miniconda/envs' | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/environment.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Create Environment | ||
shell: bash | ||
if: ${{ steps.cache-conda.outputs.cache-hit == false }} | ||
run: | | ||
conda update -n base -c defaults conda | ||
|
@@ -25,4 +32,3 @@ runs: | |
conda env create -f environment.yaml --name anaconda-linter --force | ||
conda run --name anaconda-linter pip install . | ||
conda activate anaconda-linter | ||
shell: bash |
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 |
---|---|---|
|
@@ -11,17 +11,11 @@ jobs: | |
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
- uses: ./.github/actions/setup-env | ||
- uses: pre-commit/[email protected] | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup-env | ||
- name: Run tests | ||
run: | | ||
|
@@ -56,7 +50,6 @@ jobs: | |
lint-recipe: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup-env | ||
- name: Run lint | ||
run: | | ||
|