Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Caceres <[email protected]>
  • Loading branch information
srnovus authored Nov 1, 2024
1 parent e00d37f commit 9b7d50a
Showing 1 changed file with 25 additions and 41 deletions.
66 changes: 25 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Multi-language Code Validation
name: CI Verification Workflow

on:
push:
Expand All @@ -9,51 +9,35 @@ on:
- main

jobs:
validate:
verify:
runs-on: ubuntu-latest

strategy:
matrix:
language: [node, rust]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

# Paso 3: Instalar dependencias de Node.js
- name: Install Node.js Dependencies
if: matrix.language == 'node'
run: pnpm install
- name: Install dependencies
run: npm install --omit=optional

# Paso 4: Ejecutar linters y validaciones de Node.js
- name: Run Linters for TypeScript, Vue, JS, SCSS, Pug
if: matrix.language == 'node'
- name: Verify main branch
run: |
npm run lint # Asegúrate de que `lint` esté configurado en package.json para TypeScript, Vue, JS, etc.
npm run lint:scss # Si tienes scripts separados para SCSS
npm run lint:pug # Si tienes scripts separados para Pug
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
echo "Not on the main branch. Exiting..."
exit 1
fi
echo "On main branch, proceeding."
# Paso 5: Configuración de Rust
- name: Set up Rust
if: matrix.language == 'rust'
uses: actions-rs/toolchain@v1
with:
toolchain: stable

# Paso 6: Instalar dependencias de Rust
- name: Install Rust Dependencies
if: matrix.language == 'rust'
run: cargo build

# Paso 7: Ejecutar comprobaciones de Rust
- name: Run Rust Checks
if: matrix.language == 'rust'
run: cargo check
- name: Check domain status
run: |
STATUS=$(curl -Is https://fedired.com | head -n 1)
if [[ $STATUS == *"200"* ]]; then
echo "Domain is reachable"
else
echo "Domain is not reachable"
exit 1
fi

0 comments on commit 9b7d50a

Please sign in to comment.