Skip to content

Commit

Permalink
Switch to using GitHub Actions as CI provider
Browse files Browse the repository at this point in the history
GitLab has repeatedly messed with webhooks, repository mirroring, and CI
itself in sinister ways that silently broke our CI from one day to the
next, without any advance notice, acknowledgment, or even hint what they
have done this time. On top of that, debugging their solution is a
nightmare and time sink, because they provide virtually no insight into
what is going on (at least not without involvement of third party
services) and their API endpoints may just indicate success and still do
nothing.
This time it appears that they decided to remove "pull" mirroring from
the free tier altogether, meaning that we can no longer keep code on
GitLab in sync with that on GitHub, assuming it is being pushed to the
latter. That renders their product entirely useless for our intents and
purposes.
To that end, this change switches over to using GitHub Actions as the CI
provider. While there are some direct advantages to this switch, such as
the much faster compilation and proper pull request integration, their
artifact upload is unusable for our intents and purposes. Uploaded
artifacts are seemingly always exposed as a zip archive and there is no
way to link to the most recent artifact. For us that means that code
coverage can no longer directly rely on generated HTML artifacts. As
such, we have to switch over to relying on codecov.io as the service to
which we upload collected data to be visualized.
Because GitHub Actions modules are readily available for usage of
Tarpaulin, we switch from kcov to Tarpaulin for coverage assessment (a
step which we had intended on doing irrespectively at some point
anyway). We considered the usage of grcov, which has the potential to
provide more accurate coverage information, but at this point overall
toolchain support seems to be in its infancy, with rustc panicking all
over the place, making Tarpaulin the better choice.
Aside from that those two changes, the provided CI functionality should
be largely identical.
  • Loading branch information
d-e-s-o committed Jul 7, 2022
1 parent fc14123 commit 6b0ea6f
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 63 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (C) 2022 Daniel Mueller <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later

name: CI

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
name: Build and test with cargo ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.57.0, stable]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Build
run: cargo build
- if: ${{ matrix.rust != 'stable' }}
name: Run tests
run: cargo test -- --include-ignored
- if: ${{ matrix.rust == 'stable' }}
name: Run tests
uses: actions-rs/[email protected]
with:
version: latest
args: -- --include-ignored
out-type: Xml
- if: ${{ matrix.rust == 'stable' }}
name: Upload code coverage results
uses: codecov/codecov-action@v3
with:
files: cobertura.xml
clippy:
name: Lint with clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.57.0
components: clippy
override: true
- run: cargo clippy --no-deps --all-targets --all-features -- -A unknown_lints -D warnings
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
----------
- Switched to using GitHub Actions as CI provider
- Bumped minimum supported Rust version to `1.57`
- Bumped `tokio-tungstenite` dependency to `0.17`

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![pipeline](https://gitlab.com/d-e-s-o/websocket-util/badges/main/pipeline.svg)](https://gitlab.com/d-e-s-o/websocket-util/commits/main)
[![coverage](https://gitlab.com/d-e-s-o/websocket-util/badges/main/coverage.svg)](https://gitlab.com/d-e-s-o/websocket-util/-/jobs/artifacts/main/file/kcov/kcov-merged/index.html?job=coverage:kcov)
[![pipeline](https://github.com/d-e-s-o/websocket-util/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/d-e-s-o/websocket-util/actions/workflows/ci.yml)
[![coverage](https://codecov.io/gh/d-e-s-o/websocket-util/branch/main/graph/badge.svg)](https://codecov.io/gh/d-e-s-o/websocket-util)
[![crates.io](https://img.shields.io/crates/v/websocket-util.svg)](https://crates.io/crates/websocket-util)
[![Docs](https://docs.rs/websocket-util/badge.svg)](https://docs.rs/websocket-util)
[![rustc](https://img.shields.io/badge/rustc-1.57+-blue.svg)](https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html)
Expand Down
61 changes: 0 additions & 61 deletions ci/gitlab-ci.yml

This file was deleted.

0 comments on commit 6b0ea6f

Please sign in to comment.