@@ -18,47 +18,47 @@ defaults:
1818 shell : bash
1919
2020jobs :
21- build-test :
22- name : Build and test
23- runs-on : ubuntu-24.04
24- strategy :
25- matrix :
26- # nim: ["2.0.x", "2.2.x", "devel"]
27- nim : ["2.2.x"]
28- steps :
29- - name : Checkout Code
30- uses : actions/checkout@v6
31-
32- - name : Cache Nimble Dependencies
33- id : cache-nimble
34- uses : actions/cache@v5
35- with :
36- path : ~/.nimble
37- key : ${{ matrix.nim }}-nimble-v2-${{ hashFiles('*.nimble') }}
38- restore-keys : |
39- ${{ matrix.nim }}-nimble-v2-
40-
41- - name : Setup Nim
42- uses : jiro4989/setup-nim-action@v2
43- with :
44- nim-version : ${{ matrix.nim }}
45- use-nightlies : true
46- repo-token : ${{ secrets.GITHUB_TOKEN }}
47-
48- - name : Build Project
49- run : nimble build -Y
50-
51- - name : Upload 2.2.x build artifact
52- if : matrix.nim == '2.2.x'
53- uses : actions/upload-artifact@v6
54- with :
55- name : nitter-linux-nim-2.2.x-${{ github.sha }}
56- path : |
57- ./nitter
58- if-no-files-found : error
21+ # build-test:
22+ # name: Build and test
23+ # runs-on: ubuntu-24.04
24+ # strategy:
25+ # matrix:
26+ # # nim: ["2.0.x", "2.2.x", "devel"]
27+ # nim: ["2.2.x"]
28+ # steps:
29+ # - name: Checkout Code
30+ # uses: actions/checkout@v6
31+ #
32+ # - name: Cache Nimble Dependencies
33+ # id: cache-nimble
34+ # uses: actions/cache@v5
35+ # with:
36+ # path: ~/.nimble
37+ # key: ${{ matrix.nim }}-nimble-v2-${{ hashFiles('*.nimble') }}
38+ # restore-keys: |
39+ # ${{ matrix.nim }}-nimble-v2-
40+ #
41+ # - name: Setup Nim
42+ # uses: jiro4989/setup-nim-action@v2
43+ # with:
44+ # nim-version: ${{ matrix.nim }}
45+ # use-nightlies: true
46+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
47+ #
48+ # - name: Build Project
49+ # run: nimble build -Y
50+ #
51+ # - name: Upload 2.2.x build artifact
52+ # if: matrix.nim == '2.2.x'
53+ # uses: actions/upload-artifact@v6
54+ # with:
55+ # name: nitter-linux-nim-2.2.x-${{ github.sha }}
56+ # path: |
57+ # ./nitter
58+ # if-no-files-found: error
5959
6060 integration-test :
61- needs : [build-test]
61+ # needs: [build-test]
6262 name : Integration test
6363 runs-on : ubuntu-24.04
6464
6969 - 6379:6379
7070
7171 steps :
72- - name : Install runtime deps
73- run : |
74- sudo apt-get update && sudo apt-get install -y libsass-dev libpcre3
72+ # - name: Install runtime deps
73+ # run: |
74+ # sudo apt-get update && sudo apt-get install -y libsass-dev libpcre3
7575
7676 - name : Checkout code
7777 uses : actions/checkout@v6
@@ -80,69 +80,114 @@ jobs:
8080 uses : actions/cache@v5
8181 with :
8282 path : |
83- /opt/pipx
84- /opt/pipx_bin
85- key : pipx-poetry-${{ runner.os }}-poetry-v1
86-
87- - name : Install poetry
83+ ~/.local/pipx
84+ ~/.local/bin
85+ key : pipx-poetry-${{ runner.os }}-poetry-v6
86+
87+ - name : Ensure Poetry (pipx)
88+ env :
89+ PIPX_HOME : ~/.local/pipx
90+ PIPX_SHARED_LIBS : ~/.local/pipx/shared
91+ PIPX_BIN_DIR : ~/.local/bin
8892 run : |
89- if command -v poetry >/dev/null 2>&1; then
90- poetry --version
91- else
92- pipx install poetry
93- fi
93+ mkdir -p "$PIPX_HOME" "$PIPX_BIN_DIR"
94+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
95+ # export PATH="$HOME/.local/bin:$PATH"
96+
97+ command -v poetry >/dev/null 2>&1 || pipx install poetry
98+ poetry --version
9499
95- - name : Setup Python (3.14) with poetry venv cache
100+ - name : Setup Python (3.14) with Poetry cache
96101 uses : actions/setup-python@v6
97102 with :
98103 python-version : " 3.14"
99104 cache : poetry
105+ cache-dependency-path : tests/poetry.lock
100106
101107 - name : Install Python deps
102- run : |
103- cd tests
104- poetry sync
105- poetry run seleniumbase install chromedriver
106-
107- - name : Cache Nimble Dependencies
108- uses : actions/cache@v5
109- with :
110- path : ~/.nimble
111- key : 2.2.x-nimble-v2-${{ hashFiles('*.nimble') }}
112- restore-keys : |
113- 2.2.x-nimble-v2-
114-
115- - name : Setup Nim
116- uses : jiro4989/setup-nim-action@v2
117- with :
118- nim-version : 2.2.x
119- use-nightlies : true
120- repo-token : ${{ secrets.GITHUB_TOKEN }}
121-
122- - name : Download 2.2.x build artifact
123- uses : actions/download-artifact@v4
124- with :
125- name : nitter-linux-nim-2.2.x-${{ github.sha }}
126- path : .
127-
128- - name : Make nitter binary executable
129- run : chmod +x ./nitter
130-
131- - name : Prepare Nitter Environment
132- run : |
133- cp nitter.example.conf nitter.conf
134- sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf
135-
136- # Run both Nimble tasks concurrently
137- nim r tools/rendermd.nim &
138- nim r tools/gencss.nim &
139- wait
140-
141- echo '${{ secrets.SESSIONS }}' | head -n1
142- echo '${{ secrets.SESSIONS }}' > ./sessions.jsonl
143-
144- - name : Run Tests
145- run : |
146- ./nitter &
147- cd tests
148- poetry run pytest -n3 --reruns=3 --rs .
108+ working-directory : tests
109+ run : poetry sync
110+
111+ # - name: Cache pipx + Poetry
112+ # uses: actions/cache@v5
113+ # with:
114+ # path: |
115+ # ~/.local/pipx
116+ # ~/.local/bin
117+ # key: pipx-poetry-${{ runner.os }}-poetry-2.3.2-v1
118+ #
119+ # - name: Install poetry (pipx in HOME)
120+ # env:
121+ # PIPX_HOME: ~/.local/pipx
122+ # PIPX_BIN_DIR: ~/.local/bin
123+ # PIPX_SHARED_LIBS: ~/.local/pipx/shared
124+ # run: |
125+ # mkdir -p "$PIPX_HOME" "$PIPX_BIN_DIR"
126+ # if command -v poetry >/dev/null 2>&1 && poetry --version | grep -q "2.3.2"; then
127+ # poetry --version
128+ # else
129+ # pipx install --force "poetry==2.3.2"
130+ # fi
131+ # echo "$PIPX_BIN_DIR" >> "$GITHUB_PATH"
132+ #
133+ # - name: Setup Python (3.14) with poetry venv cache
134+ # uses: actions/setup-python@v6
135+ # env:
136+ # PIPX_HOME: ~/.local/pipx
137+ # PIPX_BIN_DIR: ~/.local/bin
138+ # PIPX_SHARED_LIBS: ~/.local/pipx/shared
139+ # with:
140+ # python-version: "3.14"
141+ # cache: poetry
142+ #
143+ # - name: Install Python deps
144+ # env:
145+ # PIPX_HOME: ~/.local/pipx
146+ # PIPX_BIN_DIR: ~/.local/bin
147+ # PIPX_SHARED_LIBS: ~/.local/pipx/shared
148+ # run: |
149+ # cd tests
150+ # poetry sync
151+
152+ # - name: Cache Nimble Dependencies
153+ # uses: actions/cache@v5
154+ # with:
155+ # path: ~/.nimble
156+ # key: 2.2.x-nimble-v2-${{ hashFiles('*.nimble') }}
157+ # restore-keys: |
158+ # 2.2.x-nimble-v2-
159+ #
160+ # - name: Setup Nim
161+ # uses: jiro4989/setup-nim-action@v2
162+ # with:
163+ # nim-version: 2.2.x
164+ # use-nightlies: true
165+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
166+ #
167+ # - name: Download 2.2.x build artifact
168+ # uses: actions/download-artifact@v4
169+ # with:
170+ # name: nitter-linux-nim-2.2.x-${{ github.sha }}
171+ # path: .
172+ #
173+ # - name: Make nitter binary executable
174+ # run: chmod +x ./nitter
175+ #
176+ # - name: Prepare Nitter Environment
177+ # run: |
178+ # cp nitter.example.conf nitter.conf
179+ # sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf
180+ #
181+ # # Run both Nimble tasks concurrently
182+ # nim r tools/rendermd.nim &
183+ # nim r tools/gencss.nim &
184+ # wait
185+ #
186+ # echo '${{ secrets.SESSIONS }}' | head -n1
187+ # echo '${{ secrets.SESSIONS }}' > ./sessions.jsonl
188+ #
189+ # - name: Run Tests
190+ # run: |
191+ # ./nitter &
192+ # cd tests
193+ # poetry run pytest -n3 --reruns=3 --rs .
0 commit comments