Skip to content

chore(deps-dev): bump the eslint group with 3 updates #2030

chore(deps-dev): bump the eslint group with 3 updates

chore(deps-dev): bump the eslint group with 3 updates #2030

Workflow file for this run

name: CI
on:
push:
branches: [main, develop, dependabot/develop]
pull_request:
branches: [main, develop, dependabot/develop]
env:
# Note: The schema is dev (rather than develop) because that is the branch name on the API repo
# If this is a push to main or a pull request targeting main, use the main schema
SCHEMA_VERSION: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'pull_request' && github.base_ref == 'main' && 'main' || 'dev' }}"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
- name: Get yarn cache directory path πŸ› 
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node_modules πŸ“¦
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn
- name: Load GraphQL πŸ•Έ
run: API_BASE=https://staging.api.uobtheatre.com yarn codegen
- name: Run tests πŸ§ͺ
run: yarn test:unit --coverage
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
- name: Get yarn cache directory path πŸ› 
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node_modules πŸ“¦
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn
- name: Load GraphQL Codegen πŸ•Έ
run: GQL_SCHEMA=https://raw.githubusercontent.com/BristolSTA/uobtheatre-api/${{ env.SCHEMA_VERSION }}/schema.graphql yarn codegen
- name: Run linter πŸ‘€
run: yarn lint:tsc && yarn lint:js
- name: Check Prettier ✨
run: yarn prettier:check
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Copy Testing Env βœ‰
run: cp .env.test .env
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
- name: Get yarn cache directory path πŸ› 
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node_modules πŸ“¦
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Yarn Dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn
- name: Authenticate with GitHub Container Registry πŸ”’
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Copy Dev Container Env πŸ“
run: cp .devcontainer/.env.example .devcontainer/.env
- name: Start Real API ⭐
run: docker compose -f .devcontainer/docker-compose.yml up -d postgres uobtheatre-api
- name: Wait for API to boot πŸ’«
run: node .github/scripts/waiton-api.js http://localhost:9000
- name: Load GraphQL Codegen πŸ•Έ
run: API_BASE=http://localhost:9000 yarn codegen
- name: Run End-to-End Tests πŸ§ͺ
uses: cypress-io/github-action@v6
timeout-minutes: 7
with:
start: yarn beforetest:e2e:ci
wait-on: 'http://localhost:3000'