Skip to content

Commit

Permalink
ci: add cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Dec 20, 2023
1 parent 165c2eb commit 9a56e7d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cron

on:
schedule:
# Cron job every day at 12:00
# https://crontab.guru/#0_12_*_*_*
- cron: '12 0 * * *'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Test
run: npm test
- name: Healtcheck
run: curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/3cb379bd-82f5-49c1-9f54-6e9f314aa7ba
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 2
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -45,8 +45,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: npm install --no-package-lock
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Test
run: npm test
- name: Report
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: npm install --no-package-lock
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Test
run: npm test
- name: Report
Expand Down

0 comments on commit 9a56e7d

Please sign in to comment.