Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Mar 2, 2023
1 parent 2a526f7 commit 26b8302
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/acceptance.yml
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
43 changes: 43 additions & 0 deletions .github/workflows/changelog.yml.txt
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'
16 changes: 16 additions & 0 deletions .github/workflows/code.yml
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
16 changes: 16 additions & 0 deletions .github/workflows/unit.yml
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

0 comments on commit 26b8302

Please sign in to comment.