From 9a56e7d7b4f13803ac3613400774987592460dc2 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 20 Dec 2023 21:13:08 +0100 Subject: [PATCH] ci: add cron --- .github/workflows/cron.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/main.yml | 9 ++++++--- .github/workflows/pull_request.yml | 7 +++++-- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/cron.yml diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..0bf1be5 --- /dev/null +++ b/.github/workflows/cron.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2279a33..d78247a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6c6bf47..f3d7693 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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