baktainer/.forgejo/workflows/test.yml
James Paterni e294b9b1a3
Some checks failed
Build Docker Image / build (push) Failing after 31s
Minimal CI / test (push) Failing after 10s
Node+Ruby CI Pipeline / build (push) Blocked by required conditions
Node+Ruby CI Pipeline / notify (push) Blocked by required conditions
CI Pipeline / test (push) Failing after 36s
Build and Push Docker Image / test (push) Failing after 12s
Build Docker Image / notify (push) Failing after 1s
CI Pipeline / build (push) Has been skipped
Build and Push Docker Image / build (push) Has been skipped
Simple CI Pipeline / build (push) Has been skipped
CI Pipeline / notify (push) Successful in 1s
Simple CI Pipeline / notify (push) Successful in 1s
Simple CI Pipeline / test (push) Failing after 1s
Run Tests / test (push) Failing after 12s
Minimal CI / build (push) Has been skipped
Node+Ruby CI Pipeline / test (push) Has been cancelled
Fix Node.js executable error in Forgejo Actions workflows
- Install Node.js before checkout in all workflows that use actions
- Updated ci.yml, test.yml, build.yml, and docker.yml
- Updated README.md with fix information
- Resolves "exec: node: executable file not found in $PATH" error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 11:25:02 -04:00

64 lines
No EOL
1.6 KiB
YAML

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: docker
container:
image: ruby:3.3-alpine
defaults:
run:
working-directory: ./app
steps:
- name: Install system dependencies including Node.js
run: |
apk add --no-cache build-base libffi-dev linux-headers postgresql-dev git curl tzdata nodejs npm
- name: Checkout repository
uses: actions/checkout@v4
- name: Install bundler
run: gem install bundler -v 2.6.7
- name: Cache Ruby gems
uses: actions/cache@v4
with:
path: app/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('app/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Ruby dependencies
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run unit tests
run: |
echo "🧪 Running unit tests..."
bundle exec rspec spec/unit/ --format documentation
- name: Run integration tests
run: |
echo "🧪 Running integration tests..."
bundle exec rspec spec/integration/ --format documentation
- name: Generate coverage report
run: |
echo "📊 Generating coverage report..."
COVERAGE=true bundle exec rspec --format progress
- name: Upload coverage results
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: app/coverage/