Add missing libpcre3 installation to workflow #108
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| paths-ignore: | |
| - "*.md" | |
| branches-ignore: | |
| - master | |
| workflow_call: | |
| # Ensure that multiple runs on the same branch do not overlap. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build-test: | |
| name: Build and test | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| nim: ["2.0.x", "2.2.x", "devel"] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache Nimble Dependencies | |
| id: cache-nimble | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nimble | |
| key: ${{ matrix.nim }}-nimble-v2-${{ hashFiles('*.nimble') }} | |
| restore-keys: | | |
| ${{ matrix.nim }}-nimble-v2- | |
| - name: Setup Nim | |
| uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| nim-version: ${{ matrix.nim }} | |
| use-nightlies: true | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Project | |
| run: nimble build -d:release -Y | |
| - name: Upload 2.2.x build artifact | |
| if: matrix.nim == '2.2.x' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nitter-linux-nim-2.2.x-${{ github.sha }} | |
| path: | | |
| ./nitter | |
| if-no-files-found: error | |
| integration-test: | |
| needs: [build-test] | |
| name: Integration test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Install runtime deps (PCRE) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpcre3 | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache Nimble Dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nimble | |
| key: 2.2.x-nimble-v2-${{ hashFiles('*.nimble') }} | |
| restore-keys: | | |
| 2.2.x-nimble-v2- | |
| - name: Setup Python (3.14) with pip cache | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| cache: pip | |
| - name: Setup Nim | |
| uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| nim-version: 2.2.x | |
| use-nightlies: true | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download 2.2.x build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nitter-linux-nim-2.2.x-${{ github.sha }} | |
| path: . | |
| - name: Install SeleniumBase and Chromedriver | |
| run: | | |
| pip install seleniumbase | |
| seleniumbase install chromedriver | |
| - name: Start Redis Service | |
| uses: supercharge/redis-github-action@1.8.1 | |
| - name: Prepare Nitter Environment | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y libsass-dev | |
| cp nitter.example.conf nitter.conf | |
| sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf | |
| nimble md | |
| nimble scss | |
| echo '${{ secrets.SESSIONS }}' | head -n1 | |
| echo '${{ secrets.SESSIONS }}' > ./sessions.jsonl | |
| - name: Run Tests | |
| run: | | |
| ./nitter & | |
| pytest -n1 tests |