CI/CD tweaks.
This commit is contained in:
110
.github/workflows/test.yml
vendored
Normal file
110
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
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 dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -yq protobuf-compiler
|
||||
wget https://github.com/glauth/glauth/releases/download/v2.2.0/glauth-linux-arm64
|
||||
chmod a+rx glauth-linux-arm64
|
||||
nohup ./glauth-linux-arm64 -c tests/resources/ldap.cfg &
|
||||
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230629051228.0.0_amd64.deb -O minio.deb
|
||||
sudo dpkg -i minio.deb
|
||||
mkdir ~/minio
|
||||
nohup minio server ~/minio --console-address :9090 &
|
||||
wget https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
chmod a+rx mc
|
||||
./mc alias set myminio http://localhost:9000 minioadmin minioadmin
|
||||
./mc mb tmp
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: JMAP Protocol Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=crates/jmap-proto/Cargo.toml
|
||||
|
||||
- name: IMAP Protocol Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=crates/imap-proto/Cargo.toml
|
||||
|
||||
- name: Full-text search Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=crates/store/Cargo.toml
|
||||
|
||||
- name: Store Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=tests/Cargo.toml store -- --nocapture
|
||||
|
||||
- name: Directory Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=tests/Cargo.toml directory -- --nocapture
|
||||
|
||||
- name: SMTP Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=tests/Cargo.toml smtp -- --nocapture
|
||||
|
||||
- name: IMAP Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=tests/Cargo.toml imap -- --nocapture
|
||||
|
||||
- name: JMAP Tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --manifest-path=tests/Cargo.toml jmap -- --nocapture
|
||||
Reference in New Issue
Block a user