mirror-chatterino2/.github/workflows/test.yml
dependabot[bot] 2a38e39e24
chore(deps): bump codecov/codecov-action from 5.0.2 to 5.0.7 (#5722)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.0.2 to 5.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v5.0.2...v5.0.7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-21 11:08:33 +01:00

104 lines
3.1 KiB
YAML

---
name: Test Ubuntu
on:
pull_request:
workflow_dispatch:
merge_group:
push:
branches:
- master
- main
env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7
QT_QPA_PLATFORM: minimal
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: "${{ matrix.os }}"
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: "ubuntu-22.04"
container: ghcr.io/chatterino/chatterino2-build-ubuntu-22.04:latest
qt-version: 6.7.1
plugins: true
fail-fast: false
env:
C2_PLUGINS: ${{ matrix.plugins }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Create build directory (Ubuntu)
run: mkdir build-test
- name: Install dependencies
run: |
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
libbenchmark-dev gcovr gnupg
- name: Build (Ubuntu)
run: |
cmake \
-DBUILD_TESTS=On \
-DBUILD_BENCHMARKS=On \
-DBUILD_APP=OFF \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
-DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \
-DCHATTERINO_STATIC_QT_BUILD=On \
-DCHATTERINO_GENERATE_COVERAGE=On \
-DCMAKE_BUILD_TYPE=Debug \
..
cmake --build . -j $(nproc)
working-directory: build-test
- name: Download and extract Twitch PubSub Server Test
run: |
mkdir pubsub-server-test
curl -L -o pubsub-server.tar.gz "https://github.com/Chatterino/twitch-pubsub-server-test/releases/download/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/server-${{ env.TWITCH_PUBSUB_SERVER_TAG }}-linux-amd64.tar.gz"
tar -xzf pubsub-server.tar.gz -C pubsub-server-test
rm pubsub-server.tar.gz
cd pubsub-server-test
curl -L -o server.crt "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.crt"
curl -L -o server.key "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key"
cd ..
- uses: dtolnay/rust-toolchain@stable
- name: Cargo Install httpbox
run: |
cargo install --git https://github.com/kevinastone/httpbox --rev 89b971f
- name: Test
timeout-minutes: 30
run: |
httpbox --port 9051 &
cd ../pubsub-server-test
./server 127.0.0.1:9050 &
cd ../build-test
ctest --repeat until-pass:4 --output-on-failure
working-directory: build-test
- name: Run benchmark
timeout-minutes: 2
run: |
./bin/chatterino-benchmark --benchmark_min_time=1x
working-directory: build-test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
plugins: gcov
fail_ci_if_error: true
verbose: true