Skip to content

Railway Charades Tests Cron #121

Railway Charades Tests Cron

Railway Charades Tests Cron #121

name: Railway Charades Tests Cron
on:
schedule:
- cron: "0 0 * * 0,4"
jobs:
test:
name: railway run next tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Railway
run: npm i -g @railway/cli
- name: Install packages
run: yarn install --frozen-lockfile
- name: Tests
run: yarn test
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}
RAILWAY_SERVICE_ID: ${{ secrets.RAILWAY_SERVICE_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
## the old auto-generate workflow is below. it's turned off for now,
## but can be reactivated by uncommeting and putting it in a new yaml file
#
# name: Railway Charades Generate Cron
#
# on:
# schedule:
# - cron: "0 0 * * 1,3,5"
#
# jobs:
# test:
# name: railway run generate charades
# runs-on: ubuntu-latest
#
# strategy:
# matrix:
# node-version: [18.x]
#
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
#
# - name: Install Railway
# run: npm i -g @railway/cli
#
# - name: Install packages
# run: yarn install --frozen-lockfile
#
# - name: Create tmp directory
# run: mkdir tmp
#
# - name: Generate Charades
# run: yarn generate
# env:
# RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
# RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}
# RAILWAY_SERVICE_ID: ${{ secrets.RAILWAY_SERVICE_ID }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}