[3464] Improve i18n support for domain and view forms #15601
Workflow file for this run
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: Continuous integration | |
on: | |
push: | |
paths-ignore: | |
- "CHANGELOG.adoc" | |
- "README.adoc" | |
- "doc/**" | |
branches: | |
- "**" | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
if: github.event_name != 'pull_request' | |
with: | |
fetch-depth: 0 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request' | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Node SDK | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.7 | |
registry-url: https://npm.pkg.github.com/ | |
- name: Cache Node.js modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-node- | |
${{ runner.OS }}- | |
- name: Setup Java SDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup some global environment variables | |
run: | | |
echo "git_describe=$(git describe)" >> $GITHUB_ENV | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build the frontend packages | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${{ github.token }}" >> .npmrc | |
npm install -g yalc | |
npm ci | |
npx turbo run coverage | |
npx turbo run publish:local | |
- name: Copy frontend artifacts | |
run: | | |
mkdir -p packages/sirius-web/backend/sirius-web-frontend/src/main/resources/static | |
cp -R packages/sirius-web/frontend/sirius-web/dist/* packages/sirius-web/backend/sirius-web-frontend/src/main/resources/static | |
- name: Build the backend | |
env: | |
USERNAME: ${{github.actor}} | |
PASSWORD: ${{secrets.GITHUB_TOKEN}} | |
run: mvn -U -B -e clean verify -f packages/pom.xml --settings settings.xml | |
- name: Check if all files have been commited | |
run: node scripts/check-gitdiff.js | |
- name: Build the vscode extension | |
run: | | |
npm install -g vsce | |
npx yalc add @eclipse-sirius/sirius-components-core | |
npx yalc add @eclipse-sirius/sirius-components-diagrams | |
npx yalc add @eclipse-sirius/sirius-components-forms | |
npx yalc add @eclipse-sirius/sirius-components-selection | |
npx yalc add @eclipse-sirius/sirius-components-charts | |
npm i | |
npm run compile | |
vsce package | |
working-directory: vscode-extension | |
- name: Store the vscode extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vscode | |
path: vscode-extension/sirius-web-2024.5.1.vsix | |
retention-days: 20 | |
- name: Archive the code coverage results | |
run: tar -cf coverage.tar packages/releng/backend/sirius-components-test-coverage/target/site/jacoco-aggregate | |
- name: Store code coverage results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: jacoco | |
path: coverage.tar | |
retention-days: 5 | |
- name: Store Core frontend code coverage results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: core | |
path: packages/core/frontend/sirius-components-core/coverage | |
retention-days: 5 | |
- name: Store FormDescriptionEditors frontend code coverage results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: formdescriptioneditors | |
path: packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/coverage | |
retention-days: 5 | |
- name: Store Forms frontend code coverage results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: forms | |
path: packages/forms/frontend/sirius-components-forms/coverage | |
retention-days: 5 | |
- name: Store Trees frontend code coverage results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: trees | |
path: packages/trees/frontend/sirius-components-trees/coverage | |
retention-days: 5 | |
- name: Check the global code coverage | |
run: jshell scripts/check-coverage.jsh | |
- name: Publish the backend | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: mvn -B deploy -f packages/pom.xml | |
- name: Publish the frontend packages | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
npm publish --workspaces | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Build the Docker image | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: sirius-web | |
IMAGE_TAG: ${{ env.git_describe }} | |
run: | | |
docker build -t siriusweb packages/sirius-web/backend/sirius-web-sample-application | |
- name: Check the integration test code | |
run: | | |
npm ci | |
npm run eslint | |
working-directory: integration-tests | |
- name: Run end to end tests against the application | |
if: startsWith(github.ref, 'refs/tags/v') == false && github.ref != 'refs/heads/master' | |
uses: cypress-io/github-action@v5 | |
with: | |
build: docker compose -f ../packages/sirius-web/backend/sirius-web-sample-application/docker-compose.yml up -d | |
start: docker compose -f ../packages/sirius-web/backend/sirius-web-sample-application/docker-compose.yml ps | |
wait-on: "http://localhost:8080/login" | |
wait-on-timeout: 180 | |
working-directory: integration-tests | |
record: false | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: sirius-web | |
IMAGE_TAG: ${{ env.git_describe }} | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Store Cypress screenshots | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: cypress-screenshots | |
path: integration-tests/target/screenshots/**/*.png | |
retention-days: 5 | |
- name: Configure AWS CLI for Sirius Web | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-west-3 | |
- name: Login to Amazon Elastic Container Registry | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Tag the Docker image | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
run: docker tag siriusweb $REGISTRY/$REPOSITORY:$IMAGE_TAG | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: sirius-web | |
IMAGE_TAG: ${{ env.git_describe }} | |
- name: Upload the Docker image to AWS ECR | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: sirius-web | |
IMAGE_TAG: ${{ env.git_describe }} | |
run: | | |
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG | |
- name: Upload the Docker configuration for AWS Elastic Beanstalk | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: sirius-web | |
IMAGE_TAG: ${{ env.git_describe }} | |
run: | | |
sed -e "s|IMAGE_NAME|$REGISTRY/$REPOSITORY:$IMAGE_TAG|" Dockerrun.aws.json.template > Dockerrun.aws.json | |
aws s3 cp Dockerrun.aws.json s3://sirius-web-deployment/integration/${{ env.git_describe }}/Dockerrun.aws.json | |
- name: Create a new ElasticBeanstalk Application Version for Sirius Web Staging | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
run: aws elasticbeanstalk create-application-version --application-name "Sirius Web" --source-bundle S3Bucket="sirius-web-deployment",S3Key="integration/${{ env.git_describe }}/Dockerrun.aws.json" --version-label "${{ env.git_describe }}" --description "${{ github.sha }}" | |
- name: Deploy a new ElasticBeanstalk Application Version for Sirius Web Staging | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
run: aws elasticbeanstalk update-environment --environment-name "sirius-web-staging" --version-label "${{ env.git_describe }}" |