Skip to content

Commit

Permalink
Put back ftests
Browse files Browse the repository at this point in the history
  • Loading branch information
troger committed Oct 30, 2024
1 parent 69ac24e commit a172335
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 175 deletions.
332 changes: 166 additions & 166 deletions .github/workflows/ftest.yaml
Original file line number Diff line number Diff line change
@@ -1,166 +1,166 @@
# name: Functional tests

# on:
# pull_request:
# branches:
# - lts-2025
# workflow_call:
# inputs:
# branch:
# description: 'The current branch'
# default: lts-2025
# type: string
# required: false
# secrets:
# NPM_PACKAGES_TOKEN:
# description: 'NPM_PACKAGES_TOKEN'
# required: true
# PACKAGES_AUTH_USER:
# description: 'PACKAGES_AUTH_USER'
# required: true
# PACKAGES_AUTH_TOKEN:
# description: 'PACKAGES_AUTH_TOKEN'
# required: true

# env:
# REFERENCE_BRANCH: lts-2025
# NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
# BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'lts-2025' }}

# jobs:
# ftests:
# runs-on: [ self-hosted, master ]
# steps:
# - uses: actions/checkout@v2
# with:
# ref: ${{ env.BRANCH_NAME }}

# - uses: actions/setup-node@v3
# with:
# registry-url: ${{ env.NPM_REPOSITORY }}
# scope: '@nuxeo'
# node-version: 18

# - uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: '21'

# - name: Determine nuxeo-elements branch to link
# id: pick_nuxeo_elements_branch
# run: |
# if git ls-remote --exit-code --heads https://github.com/nuxeo/nuxeo-elements ${{ env.BRANCH_NAME }}; then
# echo ::set-output name=branch::${{ env.BRANCH_NAME }}
# else
# echo ::set-output name=branch::${{ env.REFERENCE_BRANCH }}
# fi

# - name: Install Web UI
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
# run: |
# npm cache clean -f
# npm install
# pushd packages/nuxeo-web-ui-ftest
# npm install
# popd
# pushd packages/nuxeo-designer-catalog
# npm install
# popd

# - name: Checkout the nuxeo-elements repo
# uses: actions/checkout@v2
# with:
# repository: nuxeo/nuxeo-elements
# path: nuxeo-elements
# fetch-depth: 1
# ref: ${{ steps.pick_nuxeo_elements_branch.outputs.branch }}

# - name: Pack Elements modules
# run: |
# pushd nuxeo-elements
# pushd core
# echo "ELEMENTS_CORE=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
# popd

# pushd ui
# echo "ELEMENTS_UI=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
# popd

# pushd dataviz
# echo "ELEMENTS_DATAVIZ=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
# popd

# pushd testing-helpers
# echo "ELEMENTS_HELPERS=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
# popd
# popd

# - name: Add .npmrc
# run: |
# pushd /tmp/_temp/
# rm .npmrc
# touch .npmrc
# popd
# echo '
# packages.nuxeo.com/repository/npm-public/:_auth=${NODE_AUTH_TOKEN}
# @nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/
# always-auth=true
# ' >> /tmp/_temp/.npmrc

# - name: Link elements to Web UI
# run: |
# npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/core/${ELEMENTS_CORE}
# npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/ui/${ELEMENTS_UI}
# npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/dataviz/${ELEMENTS_DATAVIZ}
# npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/testing-helpers/${ELEMENTS_HELPERS}

# - name: 'Update settings.xml with server configuration'
# run: |
# echo '<settings>
# <servers>
# <server>
# <id>maven-internal</id>
# <username>${{ secrets.PACKAGES_AUTH_USER }}</username>
# <password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
# </server>
# </servers>
# </settings>' > ~/.m2/settings.xml

# - name: Functional tests
# env:
# RUN_ALL: false
# BAIL: 0
# run: mvn -ntp install -Pftest -DskipInstall -X

# - name: Archive cucumber reports
# if: ${{ always() }}
# uses: actions/upload-artifact@v3
# with:
# name: cucumber-reports
# path: ftest/target/cucumber-reports/

# - name: Archive screenshots
# if: ${{ failure() }}
# uses: actions/upload-artifact@v3
# with:
# name: screenshots
# path: ftest/target/screenshots/

# - name: Archive logs
# if: ${{ always() }}
# uses: actions/upload-artifact@v3
# with:
# name: logs
# path: |
# **/log/*.log
# **/nxserver/config/distribution.properties

# - name: Archive packages
# if: ${{ always() }}
# uses: actions/upload-artifact@v3
# with:
# name: packages
# path: |
# plugin/web-ui/marketplace/target/nuxeo-web-ui-marketplace-*.zip
# plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
name: Functional tests

on:
pull_request:
branches:
- lts-2025
workflow_call:
inputs:
branch:
description: 'The current branch'
default: lts-2025
type: string
required: false
secrets:
NPM_PACKAGES_TOKEN:
description: 'NPM_PACKAGES_TOKEN'
required: true
PACKAGES_AUTH_USER:
description: 'PACKAGES_AUTH_USER'
required: true
PACKAGES_AUTH_TOKEN:
description: 'PACKAGES_AUTH_TOKEN'
required: true

env:
REFERENCE_BRANCH: lts-2025
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'lts-2025' }}

jobs:
ftests:
runs-on: [ self-hosted, master ]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}

- uses: actions/setup-node@v3
with:
registry-url: ${{ env.NPM_REPOSITORY }}
scope: '@nuxeo'
node-version: 18

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Determine nuxeo-elements branch to link
id: pick_nuxeo_elements_branch
run: |
if git ls-remote --exit-code --heads https://github.com/nuxeo/nuxeo-elements ${{ env.BRANCH_NAME }}; then
echo ::set-output name=branch::${{ env.BRANCH_NAME }}
else
echo ::set-output name=branch::${{ env.REFERENCE_BRANCH }}
fi
- name: Install Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm cache clean -f
npm install
pushd packages/nuxeo-web-ui-ftest
npm install
popd
pushd packages/nuxeo-designer-catalog
npm install
popd
- name: Checkout the nuxeo-elements repo
uses: actions/checkout@v2
with:
repository: nuxeo/nuxeo-elements
path: nuxeo-elements
fetch-depth: 1
ref: ${{ steps.pick_nuxeo_elements_branch.outputs.branch }}

- name: Pack Elements modules
run: |
pushd nuxeo-elements
pushd core
echo "ELEMENTS_CORE=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd ui
echo "ELEMENTS_UI=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd dataviz
echo "ELEMENTS_DATAVIZ=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd testing-helpers
echo "ELEMENTS_HELPERS=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
popd
- name: Add .npmrc
run: |
pushd /tmp/_temp/
rm .npmrc
touch .npmrc
popd
echo '
packages.nuxeo.com/repository/npm-public/:_auth=${NODE_AUTH_TOKEN}
@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/
always-auth=true
' >> /tmp/_temp/.npmrc
- name: Link elements to Web UI
run: |
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/core/${ELEMENTS_CORE}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/ui/${ELEMENTS_UI}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/dataviz/${ELEMENTS_DATAVIZ}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/testing-helpers/${ELEMENTS_HELPERS}
- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<servers>
<server>
<id>maven-internal</id>
<username>${{ secrets.PACKAGES_AUTH_USER }}</username>
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: Functional tests
env:
RUN_ALL: false
BAIL: 0
run: mvn -ntp install -Pftest -DskipInstall -X

- name: Archive cucumber reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: cucumber-reports
path: ftest/target/cucumber-reports/

- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ftest/target/screenshots/

- name: Archive logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: logs
path: |
**/log/*.log
**/nxserver/config/distribution.properties
- name: Archive packages
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: packages
path: |
plugin/web-ui/marketplace/target/nuxeo-web-ui-marketplace-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
18 changes: 9 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
with:
branch: lts-2025

# ftest:
# uses: nuxeo/nuxeo-web-ui/.github/workflows/ftest.yaml@lts-2025
# secrets:
# NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
# PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }}
# PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }}
# with:
# branch: lts-2025
ftest:
uses: nuxeo/nuxeo-web-ui/.github/workflows/ftest.yaml@lts-2025
secrets:
NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }}
PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }}
with:
branch: lts-2025

build:
needs: [lint, test, a11y]
needs: [lint, test, a11y, ftest]
runs-on: [self-hosted, master]
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit a172335

Please sign in to comment.