Skip to content

Help video script and embedded on site #135

Help video script and embedded on site

Help video script and embedded on site #135

name: Rerum Geolocator Test
on:
push:
branches:
main
pull_request:
branches:
main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Create .env from secrets
uses: SpicyPizza/create-envfile@v2
with:
envkey_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
envkey_REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
envkey_RERUM_REGISTRATION_URL: ${{ secrets.RERUM_REGISTRATION_URL }}
envkey_RERUM_API_ADDR: ${{ secrets.RERUM_API_ADDR }}
envkey_RERUM_ID_PATTERN: ${{ secrets.RERUM_ID_PATTERN }}
envkey_RERUM_ACCESS_TOKEN_URL: ${{ secrets.RERUM_ACCESS_TOKEN_URL }}
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: "21"
# Speed up subsequent runs with caching
- name: Cache node modules
uses: actions/cache@master
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Install required deps for action
- name: Install Dependencies
run: npm install
# Finally, run our tests
- name: Run the tests
run: npm run runtest