diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index aac9ceb72..539c4c581 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -20,6 +20,10 @@ on: schedule: - cron: "*/10 * * * *" +permissions: + id-token: write + contents: read + jobs: license: name: License Scanner @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86bbf065d..2e5b1da83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,10 @@ on: type: string default: "master" +permissions: + id-token: write + contents: read + env: PAUL_BLART: > '[' @@ -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 diff --git a/.github/workflows/test_matrix.json b/.github/workflows/test_matrix.json index a6d1ddaf9..e03a2482b 100644 --- a/.github/workflows/test_matrix.json +++ b/.github/workflows/test_matrix.json @@ -7,8 +7,7 @@ "experimental": false, "trigger": [ "schedule", - "workflow_dispatch", - "pull_request" + "workflow_dispatch" ] }, { @@ -74,9 +73,9 @@ "experimental": false, "trigger": [ "push", - "pull_request", "schedule", - "workflow_dispatch" + "workflow_dispatch", + "pull_request" ] }, { @@ -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", diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf30e1f1e..946e343f5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8edec3186..7b80bd16a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,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 diff --git a/tests/covalent_dispatcher_tests/_dal/asset_test.py b/tests/covalent_dispatcher_tests/_dal/asset_test.py index 678bd9463..2f3975525 100644 --- a/tests/covalent_dispatcher_tests/_dal/asset_test.py +++ b/tests/covalent_dispatcher_tests/_dal/asset_test.py @@ -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) @@ -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") @@ -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) @@ -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) @@ -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)