generated from rohberg/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Acceptance tests | ||
on: [push] | ||
|
||
env: | ||
ADDON_NAME: "@rohberg/volto-searchkit-block" | ||
ADDON_PATH: "volto-searchkit-block" | ||
VOLTO_VERSION: "16" | ||
|
||
jobs: | ||
acceptance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Cypress | ||
run: | | ||
cd acceptance | ||
yarn | ||
- name: "Cypress: Acceptance tests" | ||
uses: cypress-io/github-action@v5 | ||
env: | ||
BABEL_ENV: production | ||
CYPRESS_RETRIES: 2 | ||
with: | ||
parallel: false | ||
browser: chrome | ||
working-directory: acceptance | ||
spec: cypress/tests/*.js | ||
install: false | ||
start: | | ||
docker compose -f ci.yml --profile prod up | ||
wait-on: "npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000" | ||
|
||
# Upload Cypress screenshots | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-screenshots-acceptance | ||
path: acceptance/cypress/screenshots | ||
|
||
# Upload Cypress videos | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-videos-acceptance | ||
path: acceptance/cypress/videos |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Changelog check | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
env: | ||
node-version: 16.x | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# Fetch all history | ||
fetch-depth: '0' | ||
|
||
- name: Install pipx | ||
run: pip install towncrier | ||
|
||
# node setup | ||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
cache: 'yarn' | ||
|
||
# node install | ||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Check for presence of a Change Log fragment (only pull requests) | ||
run: | | ||
# Fetch the pull request' base branch so towncrier will be able to | ||
# compare the current branch with the base branch. | ||
# Source: https://github.com/actions/checkout/#fetch-all-branches. | ||
git fetch --no-tags origin main | ||
towncrier check --compare-with origin/main | ||
env: | ||
BASE_BRANCH: ${{ github.base_ref }} | ||
if: github.event_name == 'pull_request' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Code analysis checks | ||
on: [push] | ||
jobs: | ||
codeanalysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Linting | ||
run: make lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Unit Tests | ||
on: [push] | ||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Linting | ||
run: make test-ci |