Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from Cosmian/revert-67-fix-scaffold-cmd
Browse files Browse the repository at this point in the history
Revert "[MSE Home] Fix scaffold command"
  • Loading branch information
grydz authored Jun 19, 2024
2 parents 232cc77 + 45f6069 commit 9bc4a9f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 59 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,9 @@ on:
tags:
- "*"

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/mse-cli

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -44,3 +37,5 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
print_hash: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
80 changes: 40 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,46 +62,46 @@ jobs:
run: |
python -m pytest -m "not cloud and not home"
# tests-cloud:
# runs-on: [self-hosted, not-sgx]
# needs: check
# steps:
# # Solve perm denied issue on GA
# # see: https://github.com/actions/checkout/issues/211
# - name: Chown user
# run: |
# echo $USER
# echo $GITHUB_WORKSPACE
# sudo chown -R $USER:$USER $GITHUB_WORKSPACE
#
# - uses: actions/checkout@v3
#
# - name: Set up Python 3.8
# uses: actions/setup-python@v4
# with:
# python-version: 3.8
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install '.[dev,deploy]'
#
# - name: Run integration tests
# env:
# MSE_BASE_URL: "https://ci.backend.dev.mse.cosmian.com"
# MSE_AUTH0_CLIENT_ID: "bx2WlLrS7qr35iyNqUVTs9jMo834o8mC"
# MSE_AUTH0_DOMAIN_NAME: "https://console-dev.eu.auth0.com"
# MSE_AUTH0_AUDIENCE: "https://console-dev.eu.auth0.com/api/v2/"
# REFRESH_TOKEN: ${{ secrets.DEV_ALICE_REFRESH_TOKEN }}
# MSE_TEST_DOMAIN_NAME: ${{ vars.DEV_MSE_TEST_DOMAIN_NAME }}
# MSE_TEST_PRIVATE_KEY: ${{ secrets.DEV_MSE_TEST_PRIVATE_KEY }}
# MSE_TEST_PUBLIC_KEY: ${{ vars.DEV_MSE_TEST_PUBLIC_KEY }}
# MSE_CONF_PATH: ${{ github.workspace }}
# run: |
# echo 'email = "[email protected]"' > ${MSE_CONF_PATH}/login.toml
# echo "refresh_token = \"${REFRESH_TOKEN}\"" >> ${MSE_CONF_PATH}/login.toml
# echo "Running tests using ${MSE_BASE_URL}"
# python -m pytest -m cloud
tests-cloud:
runs-on: [self-hosted, not-sgx]
needs: check
steps:
# Solve perm denied issue on GA
# see: https://github.com/actions/checkout/issues/211
- name: Chown user
run: |
echo $USER
echo $GITHUB_WORKSPACE
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[dev,deploy]'
- name: Run integration tests
env:
MSE_BASE_URL: "https://ci.backend.dev.mse.cosmian.com"
MSE_AUTH0_CLIENT_ID: "bx2WlLrS7qr35iyNqUVTs9jMo834o8mC"
MSE_AUTH0_DOMAIN_NAME: "https://console-dev.eu.auth0.com"
MSE_AUTH0_AUDIENCE: "https://console-dev.eu.auth0.com/api/v2/"
REFRESH_TOKEN: ${{ secrets.DEV_ALICE_REFRESH_TOKEN }}
MSE_TEST_DOMAIN_NAME: ${{ vars.DEV_MSE_TEST_DOMAIN_NAME }}
MSE_TEST_PRIVATE_KEY: ${{ secrets.DEV_MSE_TEST_PRIVATE_KEY }}
MSE_TEST_PUBLIC_KEY: ${{ vars.DEV_MSE_TEST_PUBLIC_KEY }}
MSE_CONF_PATH: ${{ github.workspace }}
run: |
echo 'email = "[email protected]"' > ${MSE_CONF_PATH}/login.toml
echo "refresh_token = \"${REFRESH_TOKEN}\"" >> ${MSE_CONF_PATH}/login.toml
echo "Running tests using ${MSE_BASE_URL}"
python -m pytest -m cloud
tests-home:
runs-on: [self-hosted, sgx]
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython"
]
dependencies = [
"cryptography>=42.0.5,<43.0.0",
"docker>=7.1.0,<8.0.0",
"intel-sgx-ra==2.2.1",
"cryptography>=41.0.1,<42.0.0",
"docker>=6.0.1,<7.0.0",
"intel-sgx-ra>=2.0.1,<3.0",
"jinja2>=3.0,<3.1",
"mse-lib-crypto>=1.4,<1.5",
"mse-lib-crypto>=1.3,<1.4",
"pydantic>=1.10.2,<2.0.0",
"pyjwt>=2.6.0,<2.7.0",
"requests>=2.31.0,<3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/mse_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from pathlib import Path

__version__ = "1.2.1"
__version__ = "1.2"

# This directory contains the login information of the user
# and the context of all its deployments
Expand Down
2 changes: 1 addition & 1 deletion src/mse_cli/home/command/sgx_operator/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def run(args) -> None:

docker_config = SgxDockerConfig(
size=args.size,
host=args.host,
host=args.san,
port=args.port,
subject=args.subject,
subject_alternative_name=args.san,
Expand Down
5 changes: 0 additions & 5 deletions tests/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
-----END CERTIFICATE-----"""


@pytest.mark.skip(reason="temporary disabled due to certificate expiration")
def test_cloud_with_optionals():
"""Test `ssl` and `cloud` paragraph."""
toml = Path("tests/data/all_set.toml")
Expand Down Expand Up @@ -163,7 +162,6 @@ def test_cloud_without_optionals():
assert conf == ref_app_conf


@pytest.mark.skip(reason="temporary disabled due to certificate expiration")
def test_cloud_ssl_without_optionals():
"""Test `cloud` paragraph without setting the optional params but ssl."""
toml = Path("tests/data/cloud_ssl_without_optionals.toml")
Expand Down Expand Up @@ -211,7 +209,6 @@ def test_no_cloud():
assert conf == ref_app_conf


@pytest.mark.skip(reason="temporary disabled due to certificate expiration")
def test_options():
"""Test option param when loading."""
toml = Path("tests/data/all_set.toml")
Expand Down Expand Up @@ -261,7 +258,6 @@ def test_python_variable():
conf.python_module


@pytest.mark.skip(reason="temporary disabled due to certificate expiration")
def test_save(workspace):
"""Test `save` method."""
output = workspace / "mse.toml"
Expand Down Expand Up @@ -298,7 +294,6 @@ def test_save(workspace):
assert filecmp.cmp(toml, output)


@pytest.mark.skip(reason="temporary disabled due to certificate expiration")
def test_into_payload():
"""Test `into_cloud_payload` function."""
toml = Path("tests/data/all_set.toml")
Expand Down

0 comments on commit 9bc4a9f

Please sign in to comment.