Skip to content

Commit

Permalink
Update Playwright workflow use Jekyll detached and pytest
Browse files Browse the repository at this point in the history
Update test for use live server url to 127.0.0.1:4000
Add docker-in-docker and act devcontainer features
  • Loading branch information
oleksis committed Oct 6, 2023
1 parent a092ccb commit 8f34986
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/docker-in-docker": {},
"ghcr.io/devcontainers-contrib/features/act:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
python -m playwright install --with-deps
- name: Jekyll detached
run: bundle exec jekyll serve --detach
- name: Sleep for 45 seconds
run: sleep 45s
shell: bash
- name: Run tests
run: python -m pytest
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Jekyll detached and pytest
run: |
bundle exec jekyll serve --detach
python -m pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ venv
.jekyll-metadata
**/__pycache__
.pytest_cache
bin/
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
2 changes: 1 addition & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from playwright.sync_api import Page, expect

live_server_url = "http://localhost:4000"
live_server_url = "http://127.0.0.1:4000"

routes = [
("about.html"),
Expand Down

0 comments on commit 8f34986

Please sign in to comment.