add ci #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI for Fedired | |
on: | |
push: | |
branches: | |
- main | |
- nvus | |
pull_request: | |
branches: | |
- main | |
- nvus | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
services: | |
# Configura PostgreSQL para tus pruebas y migraciones | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: fedired_test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd="pg_isready -U postgres" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 9.9.0 | |
- name: Install dependencies with pnpm | |
run: pnpm install | |
- name: Build the project | |
run: pnpm run build | |
- name: Run TypeScript tests | |
run: pnpm run test:ts | |
- name: Run Rust tests | |
run: pnpm run test:rs | |
- name: Run Rust Miri tests | |
run: pnpm run test:rs:miri | |
- name: Run linters for TypeScript and Rust | |
run: pnpm run lint | |
- name: Clean up build files | |
run: pnpm run clean |