Skip to content

🔧 Fix GitHub org (#458) #154

🔧 Fix GitHub org (#458)

🔧 Fix GitHub org (#458) #154

Workflow file for this run

name: Lint, test and publish
on: # cf. https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch: # = manually triggered
env:
DOCKER_IMAGE: hesperides/hesperides-gui
IMAGE_TARBALL_FILENAME: hesperides-gui-docker-image.tar
UPLOAD_NAME: docker-artifact
UPLOAD_PATH: artifacts
jobs:
pre-commit-hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: wget https://bootstrap.pypa.io/get-pip.py
- run: python3.8 get-pip.py
- run: pip3 install pre-commit
- run: pre-commit run --all-files
html-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: wget https://github.com/htacg/tidy-html5/releases/download/5.4.0/tidy-5.4.0-64bit.deb
- run: sudo dpkg -i --force-overwrite tidy-5.4.0-64bit.deb
- run: for html in docs/*.html; do echo Tidying $html; tidy -quiet -lang en -modify -config docs/htmltidy.conf $html; done
js-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm ci
- run: npm run lint
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: xvfb-run npm test
bdd-technos-copy-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/copy-technos.feature
bdd-technos-create-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/create-technos.feature
bdd-technos-delete-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/delete-templates.feature
bdd-technos-download-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/download-templates.feature
bdd-technos-release-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/release-technos.feature
bdd-technos-search-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/technos/search-technos.feature
bdd-modules-add-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/add-technos.feature
bdd-modules-add-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/add-templates.feature
bdd-modules-copy-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/copy-modules.feature
bdd-modules-create-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/create-modules.feature
bdd-modules-delete-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/delete-templates.feature
bdd-modules-download-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/download-templates.feature
bdd-modules-release-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/release-modules.feature
bdd-modules-remove-technos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/remove-technos.feature
bdd-modules-search-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/modules/search-modules.feature
bdd-platforms-add-deployed-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/add-deployed-modules.feature
bdd-platforms-add-instances:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/add-instances.feature
bdd-platforms-add-logical-groups:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/add-logical-groups.feature
bdd-platforms-copy-logical-groups:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/copy-logical-groups.feature
bdd-platforms-copy-platforms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/copy-platforms.feature
bdd-platforms-create-platforms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/create-platforms.feature
bdd-platforms-deployed-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/deployed-modules.feature
bdd-platforms-detailed-properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/detailed-properties.feature
bdd-platforms-get-platforms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/get-platforms.feature
bdd-platforms-global-properties-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 1
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/global-properties-diff.feature
bdd-platforms-module-properties-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/module-properties-diff.feature
bdd-platforms-module-properties-list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/module-properties-list.feature
bdd-platforms-navigate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/navigate.feature
bdd-platforms-platform-events:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/platform-events.feature
bdd-platforms-preview-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/preview-files.feature
bdd-platforms-properties-events:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/properties-events.feature
bdd-platforms-save-global-properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/save-global-properties.feature
bdd-platforms-save-iterable-properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/save-iterable-properties.feature
bdd-platforms-save-module-properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/save-module-properties.feature
bdd-platforms-search-applications:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/search-applications.feature
bdd-platforms-search-properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: sh .github/workflows/setup_test_environment.sh
- uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 2
command: npm run bdd-tests -- --specs=test/bdd/features/platforms/search-properties.feature
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Building Docker image
run: .github/workflows/docker_build.sh "${{ github.event.commits[0].message }}"
- run: mkdir -p $UPLOAD_PATH
- run: docker save $DOCKER_IMAGE:$GITHUB_SHA > $UPLOAD_PATH/$IMAGE_TARBALL_FILENAME
- uses: actions/upload-artifact@v2
with:
name: ${{ env.UPLOAD_NAME }}
path: ${{ env.UPLOAD_PATH }}
retention-days: 1
docker-deploy:
# Only perform this on master branch
# or on branches when triggered manually
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: [
pre-commit-hooks,
html-linter,
js-linter,
unit-tests,
docker-build,
bdd-technos-copy-technos,
bdd-technos-create-technos,
bdd-technos-delete-templates,
bdd-technos-download-templates,
bdd-technos-release-technos,
bdd-technos-search-technos,
bdd-modules-add-technos,
bdd-modules-add-templates,
bdd-modules-copy-modules,
bdd-modules-create-modules,
bdd-modules-delete-templates,
bdd-modules-download-templates,
bdd-modules-release-modules,
bdd-modules-remove-technos,
bdd-modules-search-modules,
bdd-platforms-add-deployed-modules,
bdd-platforms-add-instances,
bdd-platforms-add-logical-groups,
bdd-platforms-copy-logical-groups,
bdd-platforms-copy-platforms,
bdd-platforms-create-platforms,
bdd-platforms-deployed-modules,
bdd-platforms-detailed-properties,
bdd-platforms-get-platforms,
bdd-platforms-global-properties-diff,
bdd-platforms-module-properties-diff,
bdd-platforms-module-properties-list,
bdd-platforms-navigate,
bdd-platforms-platform-events,
bdd-platforms-preview-files,
bdd-platforms-properties-events,
bdd-platforms-save-global-properties,
bdd-platforms-save-iterable-properties,
bdd-platforms-save-module-properties,
bdd-platforms-search-applications,
bdd-platforms-search-properties
]
env:
DOCKER_USER: hesperides
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ${{ env.UPLOAD_NAME }}
path: ${{ env.UPLOAD_PATH }}
- run: docker load < $UPLOAD_PATH/$IMAGE_TARBALL_FILENAME
- name: Debug-display event name
run: echo ${{ github.event_name }}
- name: Deploying image to public Docker Hub
run: .github/workflows/docker_push.sh