Skip to content

Commit

Permalink
Merge pull request #50 from orium/migrate-to-github-actions
Browse files Browse the repository at this point in the history
Migrate to github actions.
  • Loading branch information
orium committed Jan 10, 2021
2 parents 93f6b65 + 159470b commit 60a2f9c
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 42 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 19 * * 3'

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true
components: rustfmt

- name: Install cargo plugins
run: |
cargo install cargo-deadlinks
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Check everything
run: bash ./tools/check.sh

- name: Code coverage
if: ${{ runner.os == 'Linux' }}
run: |
cargo install cargo-tarpaulin
./tools/codecov.sh --xml
bash <(curl -s https://codecov.io/bash)
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/orium/rpds.svg?branch=master)](https://travis-ci.org/orium/rpds)
[![Build Status](https://github.com/orium/archery/workflows/CI/badge.svg)](https://github.com/orium/rpds/actions?query=workflow%3ACI)
[![Code Coverage](https://codecov.io/gh/orium/rpds/branch/master/graph/badge.svg)](https://codecov.io/gh/orium/rpds)
[![Dependency status](https://deps.rs/repo/github/orium/rpds/status.svg)](https://deps.rs/repo/github/orium/rpds)
[![crates.io](https://img.shields.io/crates/v/rpds.svg)](https://crates.io/crates/rpds)
Expand Down
2 changes: 2 additions & 0 deletions tools/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ find src/ -name '*.rs' \
find src/ -name '*.rs' \
| xargs -d '\n' -n1 sed -i 's,static_assertions::assert_eq_size!,// WORKAROUND TARPAULIN \0,'

# TODO it seems the `--force-clean` is not working.
cargo clean
cargo tarpaulin --features serde --force-clean --ignore-tests --ignore-panics --timeout 1200 --out $output_format

if [ "$output_format" == "Html" ]; then
Expand Down
8 changes: 0 additions & 8 deletions tools/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ function assert_installed {
fi
}

function os {
if test -n "$TRAVIS_OS_NAME"; then
echo "$TRAVIS_OS_NAME"
else
echo linux
fi
}

function project_name {
cargo pkgid | tac -s'/' | head -1 | cut -d'#' -f1
}
Expand Down

0 comments on commit 60a2f9c

Please sign in to comment.