Skip to content

Commit

Permalink
Merge pull request #111 from magnusuMET/ci-actions-refresh
Browse files Browse the repository at this point in the history
Update actions used
  • Loading branch information
magnusuMET committed Jul 11, 2023
2 parents 70f9e9b + b479d81 commit 21be785
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with: {submodules: true}
- name: Install netCDF
run: sudo apt-get update && sudo apt-get install libnetcdf-dev
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt -- --check
Expand All @@ -56,18 +54,16 @@ jobs:
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with: {submodules: false}

- name: Install netcdf
run: sudo apt-get update && sudo apt-get install libnetcdf-dev

- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Build
run: cargo build --verbose --workspace --exclude netcdf-src
Expand All @@ -90,11 +86,11 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with: {submodules: false}
- name: Install Rust (${{matrix.rust}})
uses: actions-rs/toolchain@v1
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
uses: dtolnay/rust-toolchain@stable
with: {toolchain: '${{matrix.rust}}'}
- name: Install conda
uses: conda-incubator/setup-miniconda@v2
with: {auto-update-conda: false, activate-environment: testenv}
Expand Down Expand Up @@ -124,11 +120,11 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with: {submodules: true}
- name: Install Rust (${{matrix.rust}})
uses: actions-rs/toolchain@v1
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
uses: dtolnay/rust-toolchain@stable
with: {toolchain: '${{matrix.rust}}'}
- name: Build and test
run: cargo test -vv --features static --workspace

Expand All @@ -137,11 +133,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with: {submodules: true}
- name: Install Rust
uses: actions-rs/toolchain@v1
with: {toolchain: nightly, profile: minimal, override: true}
uses: dtolnay/rust-toolchain@stable
with: {toolchain: nightly}
- name: Run test with sanitizer
env:
RUSTFLAGS: "-Z sanitizer=address"
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,27 @@ env:
jobs:
tarpaulin:
name: tarpaulin
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install netcdf
run: sudo apt-get install libnetcdf-dev

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
uses: dtolnay/rust-toolchain@stable

- name: Install tarpaulin
uses: actions-rs/install@v0.1
uses: baptiste0928/cargo-install@30f432979e99f3ea66a8fa2eede53c07063995d8 # v2.1.0
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
version: "0.26.1"

- name: Tarpaulin
run: cargo tarpaulin --verbose --out Xml --ignore-tests

- name: Upload to codecov
uses: codecov/codecov-action@v1.0.2
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 21be785

Please sign in to comment.