Added gh actions ci

This commit is contained in:
danielsanchezq 2022-09-27 12:41:57 +02:00
parent 21645c507e
commit 1e7456a8bb
1 changed files with 84 additions and 0 deletions

84
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,84 @@
# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
on: [push, pull_request]
name: CI
jobs:
check:
name: Check
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: check
test:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: build
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: test
lints:
name: Rust lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- --deny warnings