2024-01-14 14:04:37 +00:00
|
|
|
name: Unittest
|
|
|
|
|
2024-01-21 01:38:24 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
2024-01-14 14:04:37 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build unittest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-01-26 06:54:13 +00:00
|
|
|
- name: Set up Python 3.8
|
2024-01-14 14:04:37 +00:00
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
2024-01-26 06:54:13 +00:00
|
|
|
python-version: "3.8"
|
|
|
|
cache: 'pip'
|
|
|
|
- name: Install min requirements
|
|
|
|
run: pip install -r requirements-min.txt
|
|
|
|
- name: Run tests
|
|
|
|
run: python -m etc.unittest
|
2024-02-12 10:41:27 +00:00
|
|
|
- name: Set up Python 3.12
|
2024-01-26 06:54:13 +00:00
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
2024-02-11 07:36:09 +00:00
|
|
|
python-version: "3.12"
|
2024-01-14 14:04:37 +00:00
|
|
|
cache: 'pip'
|
|
|
|
- name: Install requirements
|
2024-04-08 05:52:19 +00:00
|
|
|
run: |
|
|
|
|
pip install -r requirements.txt
|
2024-04-08 05:55:19 +00:00
|
|
|
pip uninstall -y nodriver
|
2024-01-14 14:04:37 +00:00
|
|
|
- name: Run tests
|
2024-01-21 16:26:26 +00:00
|
|
|
run: python -m etc.unittest
|
|
|
|
- name: Save PR number
|
|
|
|
env:
|
|
|
|
PR_NUMBER: ${{ github.event.number }}
|
|
|
|
run: |
|
|
|
|
mkdir -p ./pr
|
|
|
|
echo $PR_NUMBER > ./pr/pr_number
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: pr_number
|
|
|
|
path: pr/
|