diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..d9d0b4c --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,52 @@ +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 }}" | base64 > firebase_service_account.json + echo "FIREBASE_SERVICE_ACCOUNT=$(cat firebase_service_account.json)" >> $GITHUB_ENV + + - name: Install Dependencies + run: 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 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..1916265 --- /dev/null +++ b/.github/workflows/stale.yml @@ -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'