2021-01-02 10:50:16 +00:00
|
|
|
name: linkding CI
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2023-01-21 23:47:47 +00:00
|
|
|
unit_tests:
|
|
|
|
name: Unit Tests
|
2021-01-02 10:50:16 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-21 23:47:47 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-02 10:50:16 +00:00
|
|
|
- name: Set up Python
|
2023-01-21 23:47:47 +00:00
|
|
|
uses: actions/setup-python@v4
|
2021-01-02 10:50:16 +00:00
|
|
|
with:
|
2022-09-04 08:05:29 +00:00
|
|
|
python-version: "3.10"
|
2021-05-14 00:38:44 +00:00
|
|
|
- name: Set up Node
|
2023-01-21 23:47:47 +00:00
|
|
|
uses: actions/setup-node@v3
|
2021-05-14 00:38:44 +00:00
|
|
|
with:
|
2023-01-21 23:47:47 +00:00
|
|
|
node-version: 18
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Setup Python environment
|
2021-01-02 10:50:16 +00:00
|
|
|
run: pip install -r requirements.txt
|
2023-01-21 23:47:47 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: python manage.py test bookmarks.tests
|
|
|
|
e2e_tests:
|
|
|
|
name: E2E Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
2021-05-14 00:38:44 +00:00
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm install
|
2023-01-21 23:47:47 +00:00
|
|
|
- name: Setup Python environment
|
|
|
|
run: |
|
|
|
|
pip install -r requirements.txt
|
|
|
|
playwright install chromium
|
|
|
|
python manage.py compilescss
|
|
|
|
python manage.py collectstatic --ignore=*.scss
|
2021-01-02 10:50:16 +00:00
|
|
|
- name: Run tests
|
2023-05-21 12:32:24 +00:00
|
|
|
run: python manage.py test bookmarks.e2e --pattern="e2e_test_*.py"
|