Skip to content

Commit

Permalink
tmp is incompatible with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Bryce committed Nov 13, 2024
1 parent 32faeca commit f55d110
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
python-version: ["3.11", "3.12" ]
# reduced matrix for ci
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
python-version: ["3.11", "3.12" ]
# reduced matrix for ci
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
# os: [ubuntu-latest, windows-latest] scripts on windows are a PITA
# instead, peaple can do 'python3 -m datatrails_scitt_samples.scripts.create_signed_statement ...'
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
verbose: true
# skip-existing: true
user: ${{ vars.PYPI_USER }}
password: ${{ secrets.PYPI_PASSWORD }}
password: ${{ secrets.PYPI_PASSWORD }}
4 changes: 2 additions & 2 deletions .github/workflows/registration-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
# NOTE: We are reling on github's ui to sanitize the inputs
echo ${{ inputs.payload }} > /tmp/payload.json
echo ${{ inputs.payload }} > payload.json
python3 -m datatrails_scitt_samples.scripts.create_signed_statement \
--signing-key-file-path datatrails_scitt_samples-signing-key.pem \
--payload-file /tmp/payload.json \
--payload-file payload.json \
--content-type ${{ inputs.content_type }} \
--subject ${{ inputs.subject }} \
--issuer ${{ inputs.issuer }} \
Expand Down
8 changes: 4 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ tasks:
CONTENT_TYPE: "application/json"
ISSUER: "github.com/datatrails/datatrails-scitt-samples/Taskfile.yml"
METADATA: '{\"key1\": \"value\", \"key2\": \"42\"}'
METADATA_FILE: "/tmp/metadata.json"
SIGNED_STATEMENT_FILE: "/tmp/signed-statement.cbor"
SIGNING_KEY: "/tmp/my-signing-key.pem"
METADATA_FILE: "metadata.json"
SIGNED_STATEMENT_FILE: "signed-statement.cbor"
SIGNING_KEY: "my-signing-key.pem"
PAYLOAD: '{\"name\": \"R2D2\"}'
PAYLOAD_FILE: "/tmp/payload.json"
PAYLOAD_FILE: "payload.json"
PAYLOAD_LOCATION: "https://storage.example/{{ .SUBJECT }}"
SUBJECT: "test:wheel"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main(args=None):
"--payload-file",
type=str,
help="filepath to the content that will be hashed into the payload of the SCITT Statement.",
default="/tmp/payload.json",
default="payload.json",
)

# payload-location
Expand All @@ -73,7 +73,7 @@ def main(args=None):
"--signing-key-file",
type=str,
help="filepath to the stored ecdsa P-256 signing key, in pem format.",
default="/tmp/my-signing-key.pem",
default="my-signing-key.pem",
)

# subject
Expand Down
4 changes: 2 additions & 2 deletions datatrails_scitt_samples/scripts/create_signed_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main(args=None):
"--payload-file",
type=str,
help="filepath to the content that will be hashed into the payload of the SCITT Statement.",
default="/tmp/payload.json",
default="payload.json",
)

# payload-location
Expand All @@ -67,7 +67,7 @@ def main(args=None):
"--signing-key-file",
type=str,
help="filepath to the stored ecdsa P-256 signing key, in pem format.",
default="/tmp/my-signing-key.pem",
default="my-signing-key.pem",
)

# subject
Expand Down
2 changes: 1 addition & 1 deletion datatrails_scitt_samples/scripts/generate_example_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import argparse
from ecdsa import SigningKey, NIST256p

FILE_NAME = "/tmp/my-signing-key.pem"
FILE_NAME = "my-signing-key.pem"


def generate_key(topem=True):
Expand Down
4 changes: 2 additions & 2 deletions unittests/test_register_signed_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def test_create_and_register_statement(self):
"""Test creating a signed statement and registering it"""

# generate an example key
generate_example_key(["--signing-key-file", "/tmp/my-signing-key.pem"])
generate_example_key(["--signing-key-file", "my-signing-key.pem"])

# create a signed statement
create_hashed_signed_statement(
[
"--signing-key-file",
"/tmp/my-signing-key.pem",
"my-signing-key.pem",
"--payload-file",
os.path.join(
self.parent_dir,
Expand Down

0 comments on commit f55d110

Please sign in to comment.