chore(deps-dev): bump the typescript group with 3 updates #1009
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
unit: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: Get yarn cache directory path π | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node_modules π¦ | |
uses: actions/[email protected] | |
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/dev/schema.graphql yarn codegen | |
- name: Run linter π | |
run: yarn lint:tsc && yarn lint:js | |
- name: Load GraphQL πΈ | |
run: API_BASE=https://staging.api.uobtheatre.com yarn codegen | |
- name: Run tests π§ͺ | |
run: yarn test:unit --coverage | |
e2e: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@master | |
- name: Copy Testing Env β | |
run: cp .env.test .env | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path π | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node_modules π¦ | |
uses: actions/[email protected] | |
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- | |
- run: yarn | |
name: Install Yarn Dependencies π¨π»βπ» | |
- name: Authenticate with GitHub Container Registry π | |
uses: docker/[email protected] | |
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@v5 | |
timeout-minutes: 7 | |
with: | |
start: yarn beforetest:e2e:ci | |
wait-on: 'http://localhost:3000' |