Skip to content

Bump marked from 14.1.4 to 15.0.4 in /notegraf-web #2731

Bump marked from 14.1.4 to 15.0.4 in /notegraf-web

Bump marked from 14.1.4 to 15.0.4 in /notegraf-web #2731

Workflow file for this run

on: [push, pull_request]
name: Continuous Integration
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
steps:
- uses: actions/checkout@v4
- uses: caizixian/toolchain@v1.0.8
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt-get install -y protobuf-compiler
- uses: caizixian/cargo@v1.0.4
with:
command: check
test:
name: Test Suite
strategy:
matrix:
notestore: [ "InMemory", "PostgreSQL" ]
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: notegraf
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
NOTEGRAF_PORT: "8000" # not used for test
NOTEGRAF_DEBUG: "true"
NOTEGRAF_NOTESTORETYPE: ${{ matrix.notestore }}
NOTEGRAF_DATABASE_HOST: "localhost"
NOTEGRAF_DATABASE_PORT: "5432"
NOTEGRAF_DATABASE_USERNAME: "postgres"
NOTEGRAF_DATABASE_PASSWORD: "password"
NOTEGRAF_DATABASE_NAME: "notegraf"
steps:
- uses: actions/checkout@v4
- uses: caizixian/toolchain@v1.0.8
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt-get install -y protobuf-compiler
- uses: caizixian/cargo@v1.0.4
with:
command: test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: caizixian/toolchain@v1.0.8
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- run: sudo apt-get install -y protobuf-compiler
- uses: caizixian/cargo@v1.0.4
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
steps:
- uses: actions/checkout@v4
- uses: caizixian/toolchain@v1.0.8
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- run: sudo apt-get install -y protobuf-compiler
- uses: caizixian/clippy-check@v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings
coverage:
name: Code coverage
strategy:
matrix:
notestore: ["InMemory", "PostgreSQL"]
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: notegraf
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
NOTEGRAF_PORT: "8000" # not used for test
NOTEGRAF_DEBUG: "true"
NOTEGRAF_NOTESTORETYPE: ${{ matrix.notestore }}
NOTEGRAF_DATABASE_HOST: "localhost"
NOTEGRAF_DATABASE_PORT: "5432"
NOTEGRAF_DATABASE_USERNAME: "postgres"
NOTEGRAF_DATABASE_PASSWORD: "password"
NOTEGRAF_DATABASE_NAME: "notegraf"
steps:
- uses: actions/checkout@v4
- uses: caizixian/toolchain@v1.0.8
with:
toolchain: stable
override: true
- run: sudo apt-get install -y protobuf-compiler
- uses: caizixian/tarpaulin@v0.1.4
with:
args: '--ignore-tests'
out-type: 'html'
- uses: actions/upload-artifact@v4
with:
name: coverage-report-html-${{ matrix.notestore }}
path: tarpaulin-report.html
frontend_test:
name: Frontend tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4.1.0
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: './notegraf-web/package-lock.json'
- run: npm install
working-directory: ./notegraf-web
- run: npx tsc --noEmit
working-directory: ./notegraf-web