Skip to content

Commit

Permalink
ci: Add jest unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Aug 4, 2024
1 parent cdc8eeb commit ebd4e37
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-with-jest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: unit-tests
on:
push:
paths:
- .github/workflows/test-with-jest.yaml
- tests/unit-test/**
pull_request:
jobs:
test-with-selenium:
name: Test with Selenium
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pull docker images
run: tests/scripts/docker-compose.sh pull
- name: Start test containers
run: tests/scripts/docker-compose.sh up -d
- name: Test selenium hub connection
run: tests/scripts/docker-utils/test-connection.sh http://selenium-hub:4444
# Start testing
- name: Test default
run: tests/scripts/docker-utils/exec-selenium.sh test_default.py
- name: Test navigation
run: tests/scripts/docker-utils/exec-selenium.sh test_navigation.py
# Clean up
- name: Stop test containers
if: always()
run: tests/scripts/docker-compose.sh shutdown
2 changes: 1 addition & 1 deletion .github/workflows/test-with-selenium.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: end-to-end-tests
on:
push:
paths:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# arxiv-utils

[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-selenium.yaml?label=tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-selenium.yaml)
[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-selenium.yaml?label=end-to-end-tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-selenium.yaml)
[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-jest.yaml?label=unit-tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-jest.yaml)
[![build](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/build-and-publish.yaml)](https://github.com/j3soon/arxiv-utils/actions/workflows/build-and-publish.yaml)

[![](https://img.shields.io/chrome-web-store/v/mnhdpeipjhhkmlhlcljdjpgmilbmehij.svg)](https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij)
Expand Down

0 comments on commit ebd4e37

Please sign in to comment.