From d11e61fa235771c176390de7b81acb79f9e54619 Mon Sep 17 00:00:00 2001 From: Astariul Date: Mon, 10 Feb 2025 00:20:56 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Add=20production=20tests,=20to=20en?= =?UTF-8?q?sure=20the=20PyPi=20index=20is=20up=20and=20running?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/install_check.yml | 36 ----------------------------- .github/workflows/static.yml | 27 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/install_check.yml diff --git a/.github/workflows/install_check.yml b/.github/workflows/install_check.yml deleted file mode 100644 index f50f28e..0000000 --- a/.github/workflows/install_check.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Installation test after page deployment - -on: - # Run after a new version is deployed - pages: - types: [deploy] - - # On demand - workflow_dispatch: - -jobs: - post_deploy_test: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-python@v5 - - name: Install public-hello - run: | - python -m pip install --upgrade pip - pip install public-hello --extra-index-url https://astariul.github.io/github-hosted-pypi/ - - # Check if the package and its dependency was installed - pip show public-hello - pip show mydependency - - # The code from the package should be accessible - python -c "from public_hello import hi; assert hi() == 'Hello world from public repository (with a dependency)'" - - name: Install public-hello older version - run: | - python -m pip install --upgrade pip - pip install public-hello==0.1 --extra-index-url https://astariul.github.io/github-hosted-pypi/ - - # Check if the package was installed - pip show public-hello - - # The code from the package should be accessible - python -c "from public_hello import hi; assert hi() == 'Hello world from public repository'" diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index f2c9e97..640ee93 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -41,3 +41,30 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + prod_checks: + runs-on: ubuntu-latest + needs: deploy + steps: + - uses: actions/setup-python@v5 + - name: Install public-hello + run: | + python -m pip install --upgrade pip + pip install public-hello --extra-index-url https://astariul.github.io/github-hosted-pypi/ + + # Check if the package and its dependency was installed + pip show public-hello + pip show mydependency + + # The code from the package should be accessible + python -c "from public_hello import hi; assert hi() == 'Hello world from public repository (with a dependency)'" + - name: Install public-hello older version + run: | + python -m pip install --upgrade pip + pip install public-hello==0.1 --extra-index-url https://astariul.github.io/github-hosted-pypi/ + + # Check if the package was installed + pip show public-hello + + # The code from the package should be accessible + python -c "from public_hello import hi; assert hi() == 'Hello world from public repository'"