Skip to content

Commit

Permalink
switch CI to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 7, 2023
1 parent e14e4b9 commit 29665ed
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 9 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master

env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1

jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: sfackler/actions/rustup@master
- uses: sfackler/actions/rustfmt@master

clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: sfackler/actions/rustup@master
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v3
with:
path: ~/.cargo/registry/index
key: index-${{ runner.os }}-${{ github.run_number }}
restore-keys: |
index-${{ runner.os }}-
- run: cargo generate-lockfile
- uses: actions/cache@v3
with:
path: ~/.cargo/registry/cache
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
- uses: actions/cache@v3
with:
path: target
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
- run: cargo clippy --all --all-targets

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker compose up -d
- uses: sfackler/actions/rustup@master
with:
version: 1.63.0
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v3
with:
path: ~/.cargo/registry/index
key: index-${{ runner.os }}-${{ github.run_number }}
restore-keys: |
index-${{ runner.os }}-
- run: cargo generate-lockfile
- uses: actions/cache@v3
with:
path: ~/.cargo/registry/cache
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
- uses: actions/cache@v3
with:
path: target
key: test-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
- run: cargo test --all
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# scheduled-thread-pool
[![Build Status](https://travis-ci.org/sfackler/scheduled-thread-pool.svg?branch=master)](https://travis-ci.org/sfackler/scheduled-thread-pool)

[Documentation](https://docs.rs/scheduled-thread-pool)

Expand Down

0 comments on commit 29665ed

Please sign in to comment.