Skip to content

Commit

Permalink
Merge pull request #200 from UCSD-E4E/ci/optimized_workflow
Browse files Browse the repository at this point in the history
ci: Optimized workflow
  • Loading branch information
ntlhui authored May 16, 2024
2 parents 355e93f + c40c196 commit dea0c07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/env_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
# continue-on-error: true
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-12, macos-11]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -26,6 +26,6 @@ jobs:
poetry install
- name: Run test
env:
NAS_CREDS: ${{ secrets.NAS_CREDS }}
NAS_CREDS: ${{ secrets.NAS_CREDS_JSON }}
run: |
poetry run python -m pytest pyha_tests -rP
13 changes: 7 additions & 6 deletions pyha_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ def create_creds() -> Dict[str, str]:
with open('credentials.json', 'r', encoding='ascii') as handle:
return json.load(handle)
else:
value = os.environ['NAS_CREDS'].splitlines()
assert len(value) == 2
return {
'username': value[0],
'password': value[1]
}
return json.loads(os.environ['NAS_CREDS'])
# value = os.environ['NAS_CREDS'].splitlines()
# assert len(value) == 2
# return {
# 'username': value[0],
# 'password': value[1]
# }


@pytest.fixture(name='reference_data', scope='session')
Expand Down

0 comments on commit dea0c07

Please sign in to comment.