Skip to content

add status to the events #50 #258

add status to the events #50

add status to the events #50 #258

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start SurrealDB
uses: surrealdb/setup-surreal@v1
with:
surrealdb_version: latest
surrealdb_port: 8000
surrealdb_username: root
surrealdb_password: root
surrealdb_auth: false
surrealdb_strict: false
surrealdb_log: trace
surrealdb_additional_args: --allow-all
- name: Show Rust version
run: rustc -Vv
- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/
./target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: System info
run: |
df -h
du -hs ~/.cargo
du -hs *
- name: Check cargo fmt
run: cargo fmt --check
- name: Update toolhain
run: rustup update
- name: Clippy stop at any warning
run: cargo clippy -- --deny warnings --no-deps
- name: Build debug version
run: cargo build --verbose
- name: Lists tests
run: cargo test -- --list
- name: Run tests
env:
RUST_BACKTRACE: 1
RUN_EXTERNAL: 1
run: |
cp Rocket.skeleton.toml Rocket.toml
cargo test --verbose
#- name: Build release version
# run: cargo build --release --verbose
# - name: Test coverage reporting (default ptrace)
# env:
# RUST_BACKTRACE: 1
# run: |
# cp Rocket.skeleton.toml Rocket.toml
# cargo install cargo-tarpaulin
# rm -rf tests
# time cargo tarpaulin --ignore-tests -o Html -o Lcov --timeout 240
#
# - uses: actions/upload-artifact@v4
# with:
# name: test-coverage-report-with-ptrace
# path: tarpaulin-report.html
#
# - name: Clean Tarpaulin files
# run: |
# rm -f tarpaulin-report.html lcov.info
- name: Test coverage reporting
env:
RUST_BACKTRACE: 1
run: |
cp Rocket.skeleton.toml Rocket.toml
cargo install cargo-tarpaulin
rm -rf tests
time cargo tarpaulin --ignore-tests -o Html -o Lcov --timeout 240 --engine llvm
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: lcov.info
- uses: actions/upload-artifact@v4
with:
name: test-coverage-report
path: tarpaulin-report.html