Skip to content

Commit fc5183e

Browse files
authored
πŸ”€ Merge pull request #86 from astariul/add_test_action
πŸ‘· Add Github action to automatically check if the site is up and working
2 parents b61d390 + 8dccb7c commit fc5183e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Installation test after page deployment
2+
3+
on:
4+
# Run after a new version is deployed
5+
pages:
6+
types: [deploy]
7+
8+
# On demand
9+
workflow_dispatch:
10+
11+
jobs:
12+
post_deploy_test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/setup-python@v5
16+
- name: Install public-hello
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install public-hello --extra-index-url https://astariul.github.io/github-hosted-pypi/
20+
21+
# Check if the package and its dependency was installed
22+
pip show public-hello
23+
pip show mydependency
24+
25+
# The code from the package should be accessible
26+
python -c "from public_hello import hi; assert hi() == 'Hello world from public repository (with a dependency)'"
27+
- name: Install public-hello older version
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install public-hello==0.1 --extra-index-url https://astariul.github.io/github-hosted-pypi/
31+
32+
# Check if the package was installed
33+
pip show public-hello
34+
35+
# The code from the package should be accessible
36+
python -c "from public_hello import hi; assert hi() == 'Hello world from public repository'"

0 commit comments

Comments
Β (0)