Skip to content

Commit

Permalink
Update GitHub actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacholt100 committed May 28, 2023
1 parent 20cbca2 commit 643472c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 28 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish to crates.io

on:
push:
branches:
- master

jobs:
test:
uses: ./.github/workflows/test.yml
publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: publish dry run
run: cargo publish --dry-run
- name: publish
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
28 changes: 0 additions & 28 deletions .github/workflows/rust.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust

on:
push:
branches: "**"
pull_request:
branches: "**"
workflow_call:

env:
CARGO_TERM_COLOR: always

jobs:
build_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust
run: rustup install stable
- name: Check crate builds on stable
run: cargo build --features serde,numtraits,rand && cargo build
test_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest nightly Rust
run: rustup install nightly
- name: Set nightly as default
run: rustup default nightly
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: sh scripts/run_all_tests.sh
- name: Run doc tests
run: cargo test --all-features --doc && cargo test --doc

0 comments on commit 643472c

Please sign in to comment.