Skip to content

chore(build): add github workflows #1

chore(build): add github workflows

chore(build): add github workflows #1

Workflow file for this run

name: General
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
reason:
description: "Reason for manual build and deploy"
required: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
environment: Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Lint
run: cargo clippy -- -D warnings
- name: Format
run: cargo fmt --check
- name: Test
run: |
cargo install cargo-tarpaulin \
&& cargo tarpaulin \
--workspace \
--no-fail-fast \
--coveralls "$COVERALLS_REPO_TOKEN"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Build
run: cargo build --release
- name: Archive
uses: actions/upload-artifact@v1
with:
name: corkscrew
path: target/release/corkscrew