test #305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
permissions: | |
contents: write | |
on: | |
watch: | |
types: started | |
workflow_dispatch: | |
# schedule: | |
# - cron: '00 00 * * *' | |
fork: | |
types: [created] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache dependencies 📦 | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node-version }}- | |
- name: Use Node.js ${{ matrix.node-version }} 🚀 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install pnpm 🚀 | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
run_install: false | |
- name: Install dependencies 🚀 | |
run: pnpm install | |
- name: test 🚀 | |
run: pnpm run test | |
- name: Create and write to info.log 🚀 | |
run: | | |
echo "Triggered by schedule at $(date)" > docs/log.txt | |
- name: Commit files 🚀 | |
run: | | |
git add docs/log.txt | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions[bot]" | |
git commit --allow-empty -m ":rocket: Update today's hot rank on $(date)" -a | |
- name: Push changes 🚀 | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: update cache 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: master | |
folder: . | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |