Skip to content

Merge pull request #1055 from AletheiaFact/fixed-empty-editor-content… #2000

Merge pull request #1055 from AletheiaFact/fixed-empty-editor-content…

Merge pull request #1055 from AletheiaFact/fixed-empty-editor-content… #2000

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Aletheia CI
on:
push:
branches: [ stage, develop ]
pull_request:
branches: [ stage, develop ]
env:
UMAMI_SITE_ID: ${{ secrets.DEVELOPMENT_UMAMI_SITE_ID }}
ORY_SDK_URL: ${{ secrets.DEVELOPMENT_ORY_SDK_URL }}
ORY_ACCESS_TOKEN: ${{ secrets.DEVELOPMENT_ORY_ACCESS_TOKEN }}
ALETHEIA_SCHEMA_ID: ${{ secrets.DEVELOPMENT_ALETHEIA_SCHEMA_ID }}
CI_ORY_USERID: ${{ secrets.CI_ORY_USERID }}
CI_MONGODB_URI: mongodb://127.0.0.1:35025/Aletheia
TEST_RECAPTCHA_SECRET: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe # public secret for CI tests provided by google
TEST_RECAPTCHA_SITEKEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI # public sitekey for CI tests provided by google
NEXT_PUBLIC_RECAPTCHA_SITEKEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI # public sitekey for CI tests provided by google
AWS_SDK_BUCKET: ${{ secrets.DEVELOPMENT_AWS_SDK_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.DEVELOPMENT_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEVELOPMENT_AWS_SECRET_ACCESS_KEY }}
GITLAB_FEATURE_FLAG_URL: ${{ secrets.GITLAB_FEATURE_FLAG_URL }}
GITLAB_FEATURE_FLAG_INSTANCE_ID: ${{ secrets.GITLAB_FEATURE_FLAG_INSTANCE_ID }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.14.0]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn lint
- run: yarn test
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Test docker image build before merge
run: |
docker build --build-arg ENVIRONMENT=development \
--build-arg NEXT_PUBLIC_UMAMI_SITE_ID=$NEXT_PUBLIC_UMAMI_SITE_ID \
--build-arg NEXT_PUBLIC_RECAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITEKEY }} .
- name: Cypress run
uses: cypress-io/github-action@v4
with:
start: yarn test:e2e:cy
wait-on: 'http://localhost:3000'
env:
CI: true