Skip to content

refactor: remove common test utilities and replace with direct file p… #122

refactor: remove common test utilities and replace with direct file p…

refactor: remove common test utilities and replace with direct file p… #122

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
branches: [dev, main]
push:
branches: [dev, main]
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Cache system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libtesseract-dev libleptonica-dev libclang-dev
version: 1.0
- name: Cache Rust toolchain and dependencies
uses: actions/cache@v3
with:
path: |
~/.rustup
~/.cargo
target
key: ${{ runner.os }}-rust-${{ hashFiles('.github/workflows/**.yaml') }}
- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Cache system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libtesseract-dev libleptonica-dev libclang-dev
version: 1.0
- name: Cache Rust toolchain and dependencies
uses: actions/cache@v3
with:
path: |
~/.rustup
~/.cargo
target
key: ${{ runner.os }}-rust-${{ hashFiles('.github/workflows/**.yaml') }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ghcr.io/${{ github.repository }}:latest