define int and prod schedulers in one resource #3762
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: UI | |
on: [push] | |
env: | |
NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF: int | |
NEXT_PUBLIC_BASE_URL: https://int.octopus.ac | |
NEXT_PUBLIC_MEDIA_BUCKET: https://science-octopus-publishing-images-int.s3.eu-west-1.amazonaws.com | |
NEXT_PUBLIC_SITEMAP_BUCKET: https://science-octopus-publishing-sitemaps-int.s3.eu-west-1.amazonaws.com | |
NEXT_PUBLIC_ORCID_APP_ID: APP-GXJE14DWV9NGHP5T | |
NEXT_PUBLIC_ORCID_AUTH_URL: https://sandbox.orcid.org/oauth | |
NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID}} | |
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN: ${{secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN}} | |
jobs: | |
prettier: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20.x Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
working-directory: ./ui | |
run: npm ci | |
- name: Run prettier check | |
working-directory: ./ui | |
run: npm run format:check | |
eslint: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20.x Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
working-directory: ./ui | |
run: npm ci | |
- name: Run lint | |
working-directory: ./ui | |
run: npm run lint | |
lighthouseci: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20.x Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
working-directory: ./ui | |
run: npm ci && npm install -g @lhci/[email protected] | |
- name: Run build | |
working-directory: ./ui | |
run: npm run build | |
- name: Run lighthouseCI | |
working-directory: ./ui | |
run: lhci autorun | |
ui-tests: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20.x Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
working-directory: ./ui | |
run: npm ci | |
- name: Run Unit tests | |
working-directory: ./ui | |
run: npm run test | |
typescript-lint: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20.x Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
working-directory: ./ui | |
run: npm ci | |
- name: Run tsc to check for typescript errors | |
working-directory: ./ui | |
run: tsc |