Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vilkinsons authored Jul 17, 2022
2 parents 1dbb075 + e248d06 commit 17ba88d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 17 deletions.
14 changes: 13 additions & 1 deletion .github/actions/warm-up-repo/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
name: Warm-up repo
description: Prepares Node and Yarn dependencies

inputs:
playwright-deps:
default: ""
description: "List of browsers separated by space, e.g. 'chrome firefox'"
required: false

runs:
using: composite
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- run: yarn install
shell: bash
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ inputs.playwright-deps == '' }}

- run: yarn playwright install-deps ${{ inputs.playwright-deps }}
if: ${{ inputs.playwright-deps != '' }}
shell: bash
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ./.github/actions/warm-up-repo

Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
name: Backend integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ./.github/actions/warm-up-repo

Expand Down Expand Up @@ -180,9 +180,19 @@ jobs:
name: Playwright tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: packages/hash/frontend/.next/cache
key: ${{ runner.os }}-frontend-next-cache-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/hash/frontend/**') }}
restore-keys: |
${{ runner.os }}-frontend-next-cache-${{ hashFiles('yarn.lock') }}-
${{ runner.os }}-frontend-next-cache
- uses: ./.github/actions/warm-up-repo
with:
playwright-deps: chrome firefox

- name: Create temp files and folders
run: |
Expand Down Expand Up @@ -213,9 +223,6 @@ jobs:
yarn workspace @hashintel/hash-frontend start 2>&1 | tee var/logs/frontend.log & ## ampersand enables background mode
yarn wait-on --timeout 30000 http://0.0.0.0:3000
- run: yarn playwright install-deps chrome firefox
if: ${{ success() || failure() }}

- name: Run Playwright tests
if: ${{ success() || failure() }}
run: |
Expand Down Expand Up @@ -257,7 +264,7 @@ jobs:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ./.github/actions/warm-up-repo

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/hash-backend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
name: Build and push HASH api image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Docker image build through docker-build-push
uses: ./.github/actions/docker-build-push
Expand All @@ -52,7 +52,7 @@ jobs:
name: Build and push HASH realtime image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Docker image build through docker-build-push
uses: ./.github/actions/docker-build-push
Expand All @@ -71,7 +71,7 @@ jobs:
name: Build and push HASH searchloader image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Docker image build through docker-build-push
uses: ./.github/actions/docker-build-push
Expand All @@ -94,7 +94,7 @@ jobs:
- build-realtime
- build-searchloader
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ./.github/actions/docker-ecr-login
with:
Expand All @@ -103,7 +103,7 @@ jobs:
AWS_REGION: ${{ env.AWS_REGION }}

# Node is used for migrating the DB
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/sync-algolia-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
Expand Down

0 comments on commit 17ba88d

Please sign in to comment.