smtp-server/.github/workflows/test.yml
2023-03-01 17:14:28 +00:00

59 lines
1.1 KiB
YAML

name: Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
style:
name: Check Style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true
- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test:
name: Test
needs: [style]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install protobuf-compiler
run: |
sudo apt-get update -y
sudo apt-get install protobuf-compiler
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Basic Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all