Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# GitHub Actions CI: lint -> test -> build -> Slack alert on completion/failure
on:
push:
branches:
- main
- 'release/*'
pull_request:
branches:
- main
schedule:
- cron: '0 2 * * *' # daily at 02:00 UTC

name: Global-press CI

jobs:
ci:
runs-on: ubuntu-latest
env:
NODE_ENV: production
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run tests
run: npm test

Comment on lines +36 to +38
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm test script is not defined in package.json. This will cause the workflow to fail. Add a "test" script to the "scripts" section of package.json, or remove this step if testing is not required.

Suggested change
- name: Run tests
run: npm test

Copilot uses AI. Check for mistakes.
- name: Build
run: npm run build

Comment on lines +39 to +41
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm run build script is not defined in package.json. This will cause the workflow to fail. Add a "build" script to the "scripts" section of package.json, or remove this step if building is not required.

Suggested change
- name: Build
run: npm run build

Copilot uses AI. Check for mistakes.
- name: Notify Slack (always runs)
if: always()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
JOB_STATUS: ${{ job.status }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
RUN_ID: ${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
ACTOR: ${{ github.actor }}
EVENT_NAME: ${{ github.event_name }}
run: |
node scripts/slack-alert.js
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts/slack-alert.js file does not exist in the repository. This step will fail when executed. Create the slack-alert.js script in a scripts/ directory or update the path to point to an existing script.

Copilot uses AI. Check for mistakes.
Loading