Skip to content

Commit

Permalink
Merge pull request #59 from cisagov/improvement/get-python-version-mo…
Browse files Browse the repository at this point in the history
…re-simply

Use the python version output by actions/setup-python
  • Loading branch information
jsf9k authored Nov 18, 2020
2 parents 2a2067f + b638143 commit 3b312c4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Store installed Python version
run: |
echo "PY_VERSION="\
"$(python -c "import platform;print(platform.python_version())")" \
>> $GITHUB_ENV
- name: Cache linting environments
uses: actions/cache@v2
with:
path: |
${{ env.PIP_CACHE_DIR }}
${{ env.PRE_COMMIT_CACHE_DIR }}
key: "lint-${{ runner.os }}-py${{ env.PY_VERSION }}-\
key: |
lint-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
${{ hashFiles('**/requirements-test.txt') }}-\
${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"
restore-keys: |
lint-${{ runner.os }}-py${{ env.PY_VERSION }}-
lint-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-
lint-${{ runner.os }}-
- name: Install dependencies
run: |
Expand Down

0 comments on commit 3b312c4

Please sign in to comment.