Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Optimized workflow #200

Merged
merged 6 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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