Skip to content

Commit

Permalink
Fixing nightly (#1863)
Browse files Browse the repository at this point in the history
* enabling centos and macos tests

* removing centos from the test matrix

* stripping unneeded tests

* further stripping tests

* fixed tests

* enabling the workflows back again since now its working

* updated changelog

* updated permissions tag in the nightly and release workflows

* removing macos test from PR trigger
  • Loading branch information
kessler-frost authored Nov 24, 2023
1 parent dc78716 commit 21f8c0c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 72 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
schedule:
- cron: "*/10 * * * *"

permissions:
id-token: write
contents: read

jobs:
license:
name: License Scanner
Expand Down Expand Up @@ -131,9 +135,6 @@ jobs:
"AgnostiqHQ/covalent-awslambda-plugin",
"AgnostiqHQ/covalent-braket-plugin",
]
permissions:
id-token: write
contents: read
steps:
- name: Build executor_base_images
uses: peter-evans/repository-dispatch@v2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ on:
type: string
default: "master"

permissions:
id-token: write
contents: read

env:
PAUL_BLART: >
'['
Expand Down Expand Up @@ -266,9 +270,6 @@ jobs:

docker:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out release tag
uses: actions/checkout@v2
Expand Down
63 changes: 3 additions & 60 deletions .github/workflows/test_matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"experimental": false,
"trigger": [
"schedule",
"workflow_dispatch",
"pull_request"
"workflow_dispatch"
]
},
{
Expand Down Expand Up @@ -74,9 +73,9 @@
"experimental": false,
"trigger": [
"push",
"pull_request",
"schedule",
"workflow_dispatch"
"workflow_dispatch",
"pull_request"
]
},
{
Expand Down Expand Up @@ -178,62 +177,6 @@
"workflow_dispatch"
]
},
{
"name": "CentOS 7 / Python 3.8 / Dask",
"os": "ubuntu-latest",
"container": {
"image": "ghcr.io/agnostiqhq/covalent-dev/centos7-py38:latest",
"options": "--user root"
},
"backend": "dask",
"experimental": false,
"trigger": [
"schedule",
"workflow_dispatch"
]
},
{
"name": "CentOS 7 / Python 3.8 / Local",
"os": "ubuntu-latest",
"container": {
"image": "ghcr.io/agnostiqhq/covalent-dev/centos7-py38:latest",
"options": "--user root"
},
"backend": "local",
"experimental": false,
"trigger": [
"schedule",
"workflow_dispatch"
]
},
{
"name": "CentOS 7 / Python 3.9 / Dask",
"os": "ubuntu-latest",
"container": {
"image": "ghcr.io/agnostiqhq/covalent-dev/centos7-py39:latest",
"options": "--user root"
},
"backend": "dask",
"experimental": false,
"trigger": [
"schedule",
"workflow_dispatch"
]
},
{
"name": "CentOS 7 / Python 3.9 / Local",
"os": "ubuntu-latest",
"container": {
"image": "ghcr.io/agnostiqhq/covalent-dev/centos7-py39:latest",
"options": "--user root"
},
"backend": "local",
"experimental": false,
"trigger": [
"schedule",
"workflow_dispatch"
]
},
{
"name": "MacOS 11 / Python 3.8 / Dask",
"os": "macos-latest",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
if: >
steps.modified-files.outputs.dispatcher == 'true'
|| env.BUILD_AND_RUN_ALL
run: PYTHONPATH=$PWD/ pytest -vvs --reruns=5 tests/covalent_dispatcher_tests --cov=covalent_dispatcher --cov-config=.coveragerc
run: PYTHONPATH=$PWD/ pytest -vvs --reruns=5 tests/covalent_dispatcher_tests --cov=covalent_dispatcher --cov-config=.coveragerc

- name: Generate dispatcher coverage report
id: dispatcher-coverage
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated word-wrap to 1.2.4 version
- Updated the nightly workflow's schedule
- Temporarily making the nightly workflow more frequent to test the fix for the failing tests
- Fixed failing tests

### Changed

Expand Down
16 changes: 11 additions & 5 deletions tests/covalent_dispatcher_tests/_dal/asset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_asset_load_data():
temppath = temp.name
key = os.path.basename(temppath)

storage_path = "/tmp"
storage_path = temppath[: -len(key)]

rec = get_asset_record(storage_path, key)
a = Asset(None, rec)
Expand All @@ -65,7 +65,9 @@ def test_asset_store_data():
with tempfile.NamedTemporaryFile("w", delete=True, suffix=".txt") as temp:
temppath = temp.name
key = os.path.basename(temppath)
storage_path = "/tmp"

storage_path = temppath[: -len(key)]

rec = get_asset_record(storage_path, key)
a = Asset(None, rec)
a.store_data("Hello\n")
Expand All @@ -80,7 +82,8 @@ def test_upload_asset():
with tempfile.NamedTemporaryFile("w", delete=True, suffix=".txt") as temp:
src_path = temp.name
src_key = os.path.basename(src_path)
storage_path = "/tmp"

storage_path = src_path[: -len(src_key)]

rec = get_asset_record(storage_path, src_key)
a = Asset(None, rec)
Expand All @@ -101,10 +104,12 @@ def test_download_asset():
with tempfile.NamedTemporaryFile("w", delete=True, suffix=".txt") as temp:
src_path = temp.name
src_key = os.path.basename(src_path)

with open(src_path, "w") as f:
f.write("Hello\n")

storage_path = "/tmp"
storage_path = src_path[: -len(src_key)]

with tempfile.NamedTemporaryFile("w", delete=True, suffix=".txt") as temp:
dest_path = temp.name
dest_key = os.path.basename(dest_path)
Expand All @@ -123,10 +128,11 @@ def test_copy_asset():
with tempfile.NamedTemporaryFile("w", delete=True, suffix=".txt") as temp:
src_path = temp.name
src_key = os.path.basename(src_path)

with open(src_path, "w") as f:
f.write("Hello\n")

storage_path = "/tmp"
storage_path = src_path[: -len(src_key)]
rec = get_asset_record(storage_path, src_key)
src_asset = Asset(None, rec)

Expand Down

0 comments on commit 21f8c0c

Please sign in to comment.