-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEVOPS-138
- Loading branch information
Showing
5 changed files
with
136 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,56 @@ | ||
name: Branch Coverage | ||
|
||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - gha | ||
|
||
jobs: | ||
coverage: | ||
runs-on: gha-runners-delib-py2 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plone-version: ["4.3"] | ||
services: | ||
soffice: | ||
image: harbor.imio.be/common/libreoffice:7.3 | ||
ports: | ||
- 2002:2002 | ||
volumes: | ||
- /tmp:/tmp | ||
- /var/tmp:/var/tmp | ||
credentials: | ||
username: ${{ secrets.COMMON_HARBOR_USERNAME }} | ||
password: ${{ secrets.COMMON_HARBOR_PASSWORD }} | ||
steps: | ||
- name: Needed for local development | ||
if: ${{ env.ACT }} | ||
run: echo /home/runner/externals/node20/bin >> $GITHUB_PATH | ||
- name: Run check | ||
uses: IMIO/gha/plone-package-test-notify@v4 | ||
env: | ||
cache-name: cache-eggs | ||
with: | ||
CACHE_KEY: ${{ runner.os }}-build-${{ env.cache-name }}-2.7.18 | ||
TEST_COMMAND: coverage run bin/test | ||
INSTALL_DEPENDENCIES_COMMANDS: | | ||
sudo pip2.7 install -r requirements-tests.txt | ||
sudo apt-get update | ||
sudo apt-get install -y python3-pip | ||
sudo pip3 install -r requirements-coverage.txt | ||
MATTERMOST_WEBHOOK_URL: ${{ secrets.DELIB_MATTERMOST_WEBHOOK_URL }} | ||
#BUILDOUT_CONFIG_FILE: 'test-${{ matrix.plone-version }}.cfg' | ||
BUILDOUT_CONFIG_FILE: buildout.cfg | ||
- name: Report | ||
run: | | ||
coverage report | ||
coverage xml | ||
shell: bash | ||
# - name: Publish to Coveralls | ||
# run: | | ||
# coveralls --service=github | ||
# shell: bash | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,49 @@ | ||
name: Test package | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
branches: | ||
- master | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: gha-runners-delib-py2 | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["2.7"] | ||
plone-version: ["4.3"] | ||
experimental: [false] | ||
if: ${{ !github.event_name == 'pull_request' || !github.event.pull_request.draft }} | ||
steps: | ||
- name: Needed for local development | ||
if: ${{ env.ACT }} | ||
run: echo /home/runner/externals/node20/bin >> $GITHUB_PATH | ||
shell: bash | ||
- name: Launch soffice | ||
run: soffice '--accept=socket,host=0.0.0.0,port=2002;urp;StarOffice.ServiceManager' --nologo --headless --nofirststartwizard --norestore & | ||
shell: bash | ||
- name: Run tests | ||
uses: IMIO/gha/plone-package-test-notify@main | ||
env: | ||
cache-name: cache-eggs | ||
with: | ||
CACHE_KEY: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.python-version }} | ||
TEST_COMMAND: OO_SERVER=localhost OO_PORT=2002 bin/testnamur --layer=\!ROBOT --test=\!\(testSetup\|testPerf\) -s Products.MeetingNamur | ||
INSTALL_DEPENDENCIES_COMMANDS: | | ||
sudo pip install -r requirements-tests.txt | ||
MATTERMOST_WEBHOOK_URL: ${{ secrets.DELIB_MATTERMOST_WEBHOOK_URL }} |
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,28 @@ | ||
[buildout] | ||
extends = https://raw.githubusercontent.com/IMIO/buildout.pm/refs/heads/master/communes-dev.cfg | ||
|
||
auto-checkout += | ||
Products.MeetingNamur | ||
|
||
parts += | ||
testnamur | ||
|
||
[instance1] | ||
eggs += | ||
Products.MeetingNamur | ||
|
||
zcml += | ||
Products.MeetingNamur | ||
Products.MeetingCommunes | ||
imio.pm.locales | ||
|
||
[sources] | ||
Products.MeetingNamur = git ${remotes:imio}/Products.MeetingNamur.git pushurl=${remotes:imio_push}/Products.MeetingNamur.git branch=master | ||
|
||
[testnamur] | ||
recipe = zc.recipe.testrunner | ||
defaults = ['--auto-color', '--auto-progress', '-s', 'Products.MeetingNamur'] | ||
eggs = | ||
${test:eggs} | ||
Products.MeetingNamur [test] | ||
environment = testenv |
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 @@ | ||
coveralls==4.0.1 |
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,2 @@ | ||
-r https://raw.githubusercontent.com/IMIO/buildout.pm/refs/heads/master/requirements.txt | ||
coverage==5.5 |