Skip to content

setup github actions #11

setup github actions

setup github actions #11

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
environment: staging
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: node common/scripts/install-run-rush.js install
- run: node common/scripts/install-run-rush.js build
- run: (cd discord && ./client_config_ci.sh)
env:
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
DISCORD_SESSION_SECRET: ${{ secrets.DISCORD_SESSION_SECRET }}
DISCORD_REDIRECT_URI: ${{ secrets.DISCORD_REDIRECT_URI }}
- run: node common/scripts/install-run-rush.js lint
- run: node common/scripts/install-run-rush.js lint:md
- run: node common/scripts/install-run-rush.js test
- name: Cypress.io
uses: cypress-io/github-action@v5.8.2
- run: node common/scripts/install-run-rush.js test:cypress --verbose