Skip to content

Commit f77f19a

Browse files
api key in secrets
1 parent 15a5c69 commit f77f19a

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

.github/workflows/testing.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,14 @@ jobs:
4343
if: matrix.os == 'windows-latest'
4444
run: echo "SSL_CERT_FILE=$(python -m certifi)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
4545

46-
- name: Format API key name (Linux/MacOS)
47-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
48-
run: |
49-
echo "API_KEY_NAME=$(echo ${{ format('MP_API_KEY_{0}_{1}', matrix.os, matrix.python-version) }} | awk '{gsub(/-|\./, "_"); print}' | tr '[:lower:]' '[:upper:]')" >> $GITHUB_ENV
50-
51-
- name: Format API key name (Windows)
52-
if: matrix.os == 'windows-latest'
53-
run: |
54-
echo "API_KEY_NAME=$(echo ${{ format('MP_API_KEY_{0}_{1}', matrix.os, matrix.python-version) }} | awk '{gsub(/-|\./, "_"); print}' | tr '[:lower:]' '[:upper:]')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
55-
5646
- name: Lint with mypy
5747
shell: bash -l {0}
5848
run: python -m mypy mp_api/
5949

6050
- name: Test with pytest
6151
if: always()
6252
env:
63-
MP_API_KEY: ${{ secrets[env.API_KEY_NAME] }}
53+
MP_API_KEY: ${{ secrets.MP_API_KEY_UBUNTU_LATEST_3_12 }}
6454
# MP_API_ENDPOINT: https://api-preview.materialsproject.org/
6555
run: |
6656
pytest -n auto -x --cov=mp_api --cov-report=xml

0 commit comments

Comments
 (0)