Skip to content

Commit

Permalink
Add stress step to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Jan 9, 2025
1 parent 53611ef commit 5d4616f
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Stress test the package

on:
push:
branches:
- main
pull_request:
paths:
- 'bin/**'
- 'fitsio/**'
- 'fitsio-derive/**'
- 'fitsio-sys/**'
- 'testdata/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'Cross.toml'
- 'rust-toolchain.toml'
- '.github/workflows/*.yml'

# Only one pull-request triggered run should be executed at a time
# (head_ref is only set for PR events, otherwise fallback to run_id which differs for every run).
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
stress:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- macos-13

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends -y \
llvm-dev \
libcfitsio-dev \
pkg-config \
libssl-dev \
python3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: beta

- uses: Swatinem/rust-cache@v2

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Install cargo-stress
run: cargo install cargo-stress

- name: Stress test the code
working-directory: fitsio
run: cargo stress

0 comments on commit 5d4616f

Please sign in to comment.