Skip to content

convert read_code_from_email #277

convert read_code_from_email

convert read_code_from_email #277

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
run: |
pwd
ls -l
docker volume create my-surreal-db
docker run --detach --restart always --name surrealdb -p 127.0.0.1:8000:8000 --user root -v$(pwd):/external -v my-surreal-db:/database surrealdb/surrealdb:v2.0.1 start --user root --pass root --log trace file://database
#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 *
docker ps
which surreal || echo "no surreal"
which surrealdb || echo "no surrealdb"
printenv | sort
- 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: Lists tests
run: cargo test -- --list
- name: Run tests
env:
RUST_BACKTRACE: 1
RUN_EXTERNAL: 1
run: |
pwd
ls -l
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 -f tests/*.rs
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