Skip to content

Commit

Permalink
test on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Jan 22, 2022
1 parent ca5d908 commit 710134c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:

release:
name: Release to crates.io
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Publish to crates.io
env:
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo publish --token "${CARGO_TOKEN}"
26 changes: 26 additions & 0 deletions .github/workflows/test-compiler-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Verify that atoi still works with Rust 1.56.0
name: Test complier version

on: [push, pull_request]


jobs:

linux:
name: Test compatibility with older Rust toolchain
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

# Verify that atoi still works with Rust 1.56.0 (version which introduced editon 2021)
- name: Install Rust toolchain 1.56.0
uses: actions-rs/toolchain@v1
with:
toolchain: "1.56.0"
default: true
override: true

- name: Test with Rust 1.56.0
run: cargo test
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and test

on: [push, pull_request]


jobs:

linux:
name: Test & Bench Linux
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Test
run: cargo test

- name: Bench
run: cargo bench

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "atoi"
version = "0.4.0"
authors = ["Markus Klein <markus-klein@live.de>"]
version = "1.0.0"
authors = ["Markus Klein"]
license = "MIT"
repository = "https://github.com/pacman82/atoi-rs"
documentation = "https://docs.rs/atoi/"
edition = "2018"
edition = "2021"

# A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown).
Expand Down

0 comments on commit 710134c

Please sign in to comment.