Skip to content

WIP fronts integration PLUS 'suggest alternate crops' buttons (for co… #2210

WIP fronts integration PLUS 'suggest alternate crops' buttons (for co…

WIP fronts integration PLUS 'suggest alternate crops' buttons (for co… #2210

Workflow file for this run

# Find full documentation here https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: CI
on:
# Manual invocation.
workflow_dispatch:
push:
jobs:
CI:
runs-on: ubuntu-latest
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
# required by aws-actions/configure-aws-credentials
id-token: write
contents: read
steps:
- name: calculate build number
run: |
LAST_TEAMCITY_BUILD=650
echo "BUILD_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD ))" >> $GITHUB_ENV
- uses: actions/checkout@v4
# Setup AWS credentials to enable uploading to S3 for Riff-Raff.
# See https://github.com/aws-actions/configure-aws-credentials
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
- run: corepack enable
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: install dependencies
run: yarn install
- name: check for duplicate dependencies (if it fails here, then pre-commit hook is not working)
run: yarn dedupe --check
- name: generate TS definitions for GraphQL schema
run: yarn graphql-refresh
- name: perform a prettier check
run: yarn prettier-check
- name: perform a linting check
run: yarn lint
- name: write the current GIT hash to GIT_COMMIT_HASH.ts (so it's available at build time - so it gets baked into the artifact)
run: |
GIT_COMMIT_HASH=$(git rev-parse HEAD)
echo 'export const GIT_COMMIT_HASH = "'$GIT_COMMIT_HASH'";' > GIT_COMMIT_HASH.ts
- name: write the current BUILD_NUMBER to BUILD_NUMBER.ts (so it's available at build time - so it gets baked into the artifact)
run: echo 'export const BUILD_NUMBER = "'$BUILD_NUMBER'";' > BUILD_NUMBER.ts
- name: test all workspaces (i.e. modules)
run: yarn test
- name: build all workspaces (i.e. modules)
run: yarn build
- name: combine client and bootstrapping-lambda into directory
run: |
mkdir -p dist/client
cp -v bootstrapping-lambda/dist/index.js dist/
cp -v client/dist/pinboard.main* dist/client
cp -rv client/dist/push-notifications dist/client
- name: upload riff-raff artifacts
run: |
export GITHUB_RUN_NUMBER=$BUILD_NUMBER
yarn node-riffraff-artifact