Skip to content

Commit

Permalink
github actions (#52)
Browse files Browse the repository at this point in the history
* github actions

* fix check

* clean

* fix cd
  • Loading branch information
kigawas authored Dec 9, 2020
1 parent d29597e commit 17bbe96
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 122 deletions.
121 changes: 0 additions & 121 deletions .circleci/config.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish

on:
release:
types: [created]

env:
CARGO_TERM_COLOR: always

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install wasm dep
run: cargo install wasm-bindgen-cli || true
- name: Run openssl tests
run: cargo test
- name: Run pure rust tests
run: cargo test --no-default-features --features pure
- name: Run wasm tests
run: cargo test --no-default-features --features pure --target=wasm32-unknown-unknown
- name: Publish cargo package
run: cargo login $CARGO_LOGIN_TOKEN && cargo publish
env:
CARGO_LOGIN_TOKEN: ${{ secrets.CARGO_LOGIN_TOKEN }}
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build

on:
push:
branches: [master]

pull_request:
branches: [master]

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: wasm32-unknown-unknown
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- uses: actions/cache@v2
with:
path: |
target
key: ${{ runner.os }}-lint-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions-rs/cargo@v1
with:
command: fmt
- uses: actions-rs/cargo@v1
with:
command: clippy

build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install wasm dep
run: cargo install wasm-bindgen-cli || true
- name: Run openssl tests
run: cargo test
- name: Run pure rust tests
run: cargo test --no-default-features --features pure
- name: Run wasm tests
run: cargo test --no-default-features --features pure --target=wasm32-unknown-unknown
- name: Check cargo package
run: cargo publish --dry-run
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1c6d6ed949dd4836ab97421039e8be75)](https://www.codacy.com/app/ecies/rs)
[![License](https://img.shields.io/github/license/ecies/rs.svg)](https://github.com/ecies/rs)
[![Circle CI](https://img.shields.io/circleci/project/ecies/rs/master.svg)](https://circleci.com/gh/ecies/rs)
[![CI](https://github.com/ecies/rs/workflows/Build/badge.svg)](https://github.com/ecies/rs/actions)
[![Crates](https://img.shields.io/crates/v/ecies)](https://crates.io/crates/ecies)
[![Doc](https://docs.rs/ecies/badge.svg)](https://docs.rs/ecies/latest/ecies/)

Expand Down

0 comments on commit 17bbe96

Please sign in to comment.