Skip to content

Commit

Permalink
(add) GitHub Continuous Integration (CI) workflows ⚙️
Browse files Browse the repository at this point in the history
  • Loading branch information
EbodShojaei committed Jan 30, 2025
1 parent 4893f20 commit 913b5b9
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This file builds and runs the Node server for the client using pnpm.
# Checks to ensure successful compile, lint, and run.
#
# The versioning is locked in the client folder. See @client/pnpm-lock.yaml file.
#

name: Node.js CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
lint-and-build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: client/pnpm-lock.yaml

- name: Set Firebase Credentials
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > $GITHUB_WORKSPACE/firebase_service_account.json

- name: Install Dependencies
run: timeout 300s pnpm install --frozen-lockfile --reporter=silent
working-directory: client

- name: List Installed Node Modules
run: ls -la client/node_modules

- name: Run Lint
run: pnpm lint
working-directory: client

- name: Run Build
run: pnpm build
working-directory: client
29 changes: 29 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# Custom time set to 4:00 PM UTC (8:00 AM PST)
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '0 16 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'

0 comments on commit 913b5b9

Please sign in to comment.