Skip to content

Update CHANGELOG

Update CHANGELOG #474

Workflow file for this run

name: Build and Upload to S3
on:
push:
branches:
- '**'
tags:
- '**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install code
run: yarn install --frozen-lock-file
- name: eslint
run: yarn lint
- name: stylelint
run: yarn stylelint
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install code
run: yarn install --frozen-lock-file
- name: Run tests
run: yarn run test --coverage --maxWorkers=4 --reporters=default --reporters=jest-junit --reporters=jest-github-actions-reporter
env:
JEST_JUNIT_OUTPUT_DIR: ./coverage/
- name: Record coverage
run: ./.github/workflows/record_coverage
env:
GITHUB_TOKEN: ${{ github.token }}
test-cypress:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install code
run: yarn install --frozen-lock-file
- name: Cypress run
uses: cypress-io/github-action@v4
with:
install: false
start: |
yarn start
yarn start:wc
wait-on: 'http://localhost:3000, http://localhost:3001'
env:
PUBLIC_URL: 'http://localhost:3000'
- name: Archive cypress artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-artifacts
path: |
cypress/screenshots
cypress/videos
build-and-deploy-release:
if: github.ref_type == 'tag'
needs:
- test
uses: ./.github/workflows/build-and-deploy.yml
with:
deploy_dir: ${{ github.ref_name }}
environment: production
public_url: https://editor.raspberrypi.org/${{ github.ref_name }}
react_app_api_endpoint: https://editor-api.raspberrypi.org
react_app_authentication_url: https://auth-v1.raspberrypi.org
secrets: inherit
build-and-deploy-staging:
if: github.ref == 'refs/heads/main'
needs:
- test
uses: ./.github/workflows/build-and-deploy.yml
with:
deploy_dir: ${{ github.ref_name }}
environment: staging
public_url: https://staging-editor.raspberrypi.org/${{ github.ref_name }}
secrets: inherit
build-and-deploy-preview:
if: github.ref_type == 'branch' && github.ref != 'refs/heads/main'
uses: ./.github/workflows/build-and-deploy.yml
with:
deploy_dir: previews/${{ github.ref_name }}
environment: previews/${{ github.ref_name }}
public_url: http://python-editor-dist-test.s3-website.eu-west-2.amazonaws.com/previews/${{ github.ref_name }}
secrets: inherit