test-oca
This commit is contained in:
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 16.0
|
||||
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
name: Run unit tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install dependencies
|
||||
working-directory: helpdesk_transfer_timesheet_to_task
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Test with pytest
|
||||
working-directory: helpdesk_transfer_timesheet_to_task
|
||||
run: |
|
||||
pytest --cov --junitxml=junit.xml
|
||||
# Copy and paste the codecov/test-results-action here
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
- name: Upload test results to Codecov
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/test-results-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
50
.github/workflows/test.yml
vendored
Normal file
50
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 16.0
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
container: ${{ matrix.container }}
|
||||
name: ${{ matrix.name }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest
|
||||
name: test with Odoo
|
||||
- container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest
|
||||
name: test with OCB
|
||||
makepot: "true"
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:12.0
|
||||
env:
|
||||
POSTGRES_USER: odoo
|
||||
POSTGRES_PASSWORD: odoo
|
||||
POSTGRES_DB: odoo
|
||||
ports:
|
||||
- 5432:5432
|
||||
env:
|
||||
OCA_ENABLE_CHECKLOG_ODOO: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install addons and dependencies
|
||||
run: oca_install_addons
|
||||
- name: Check licenses
|
||||
run: manifestoo -d . check-licenses
|
||||
- name: Check development status
|
||||
run: manifestoo -d . check-dev-status --default-dev-status=Beta
|
||||
- name: Initialize test db
|
||||
run: oca_init_test_database
|
||||
- name: Run tests
|
||||
run: oca_run_tests
|
||||
- uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
Reference in New Issue
Block a user