2023-04-21 15:41:48 +00:00
|
|
|
name: Tests
|
2023-03-28 15:36:48 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "*.md"
|
2023-04-21 21:43:46 +00:00
|
|
|
branches-ignore:
|
|
|
|
- master
|
|
|
|
workflow_call:
|
2023-03-28 15:36:48 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-31 23:46:24 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
nim:
|
|
|
|
- "1.6.10"
|
|
|
|
- "1.6.x"
|
|
|
|
- "2.0.x"
|
2023-03-28 15:36:48 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Cache nimble
|
|
|
|
id: cache-nimble
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.nimble
|
|
|
|
key: nimble-${{ hashFiles('*.nimble') }}
|
|
|
|
restore-keys: "nimble-"
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
cache: "pip"
|
|
|
|
- uses: jiro4989/setup-nim-action@v1
|
|
|
|
with:
|
2023-10-31 23:46:24 +00:00
|
|
|
nim-version: ${{ matrix.nim }}
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-03-28 15:36:48 +00:00
|
|
|
- run: nimble build -d:release -Y
|
|
|
|
- run: pip install seleniumbase
|
|
|
|
- run: seleniumbase install chromedriver
|
|
|
|
- uses: supercharge/redis-github-action@1.5.0
|
|
|
|
- name: Prepare Nitter
|
|
|
|
run: |
|
|
|
|
sudo apt install libsass-dev -y
|
|
|
|
cp nitter.example.conf nitter.conf
|
2023-11-01 04:06:42 +00:00
|
|
|
sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf
|
2023-03-28 15:36:48 +00:00
|
|
|
nimble md
|
|
|
|
nimble scss
|
2023-11-01 04:19:10 +00:00
|
|
|
echo '${{ secrets.GUEST_ACCOUNTS }}' > ./guest_accounts.jsonl
|
2023-03-28 15:36:48 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
./nitter &
|
|
|
|
pytest -n4 tests
|