2
0
forked from jmug/cactoide
Files
cactoide/.github/workflows/test.yml
2025-12-08 08:43:00 +01:00

47 lines
1013 B
YAML

name: test & build
permissions:
contents: read
pull-requests: write
on:
push:
branches: [main]
pull_request:
branches: ['**']
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build application
run: npm run build
env:
FEDERATION_INSTANCE: ${{ vars.FEDERATION_INSTANCE }}
PUBLIC_LANDING_INFO: ${{ vars.PUBLIC_LANDING_INFO }}
LOG_PRETTY: ${{ vars.LOG_PRETTY }}
LOG_LEVEL: ${{ vars.LOG_LEVEL }}
- name: Test build output
run: |
if [ ! -d "build" ]; then
echo "Build directory not found!"
exit 1
fi
echo "Build successful! Build directory exists."