Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate online smoke tests from main CI #120

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: smoke-tests

permissions:
contents: read

on:
workflow_dispatch:
schedule:
# We run these tests on a daily basis (at a time slightly offset from the
# top of the hour), because they rely on external 3rd party services that
# can be flaky.
- cron: '15 18 * * *'

jobs:
smoke-tests:
name: Smoke Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
# test a bunch of toolchains on ubuntu
rust:
- stable
- beta
- nightly
os: [ ubuntu-latest ]
# but only stable on macos/windows (slower platforms)
include:
- os: macos-latest
rust: stable
- os: windows-latest
rust: stable
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Install NASM for aws-lc-rs on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1

- name: Build main crate
run: cargo build --locked

- name: Run smoke tests
run: cargo test --locked -- --ignored
env:
RUST_BACKTRACE: 1
8 changes: 8 additions & 0 deletions tests/smoketests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fn check_site(domain: &str) -> Result<(), ()> {

#[test]
#[serial]
#[ignore]
fn google() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -74,6 +75,7 @@ fn google() {

#[test]
#[serial]
#[ignore]
fn amazon() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -84,6 +86,7 @@ fn amazon() {

#[test]
#[serial]
#[ignore]
fn facebook() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -94,6 +97,7 @@ fn facebook() {

#[test]
#[serial]
#[ignore]
fn netflix() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -104,6 +108,7 @@ fn netflix() {

#[test]
#[serial]
#[ignore]
fn ebay() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -114,6 +119,7 @@ fn ebay() {

#[test]
#[serial]
#[ignore]
fn apple() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -124,6 +130,7 @@ fn apple() {

#[test]
#[serial]
#[ignore]
fn badssl_with_env() {
unsafe {
// SAFETY: safe because of #[serial]
Expand All @@ -144,6 +151,7 @@ fn badssl_with_env() {

#[test]
#[serial]
#[ignore]
fn badssl_with_dir_from_env() {
unsafe {
// SAFETY: safe because of #[serial]
Expand Down