mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: CI Checks
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
GOOGLE_CLIENT_ID:
|
|
required: true
|
|
GOOGLE_CLIENT_SECRET:
|
|
required: true
|
|
GH_CLIENT_ID:
|
|
required: true
|
|
GH_CLIENT_SECRET:
|
|
required: true
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Test
|
|
run: yarn test
|
|
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build Test Environment, Stage 1
|
|
run: docker-compose -f docker-compose.testing.yml build base backend app-test cypress
|
|
|
|
- name: Build Test Quests
|
|
run: docker-compose -f docker-compose.testing.yml run --rm backend yarn build:quests
|
|
|
|
- name: Run Cypress Tests
|
|
env:
|
|
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
|
|
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
|
|
GITHUB_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }}
|
|
GITHUB_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
|
|
run: docker-compose -f docker-compose.testing.yml run cypress
|