Upgrade suggested python version for Odoo 15 and Odoo 16 #226
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
# Workflow to run tests in docker containers for OS that are not supported by github actions. | |
name: Tests OS integrations | |
on: | |
push: | |
branches: | |
- '*' | |
env: | |
ODOOD_DLANG_COMPILER: ldc-1.39.0 | |
# In this test, we build Odood on Ubuntu 20.04 and then try to run | |
# produced binary on different distros and versions | |
jobs: | |
# Compile test builds on ubuntu 20.04 | |
compile-ubuntu-20_04: | |
name: Build Ubuntu:20.04 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install D compiler | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ${{ env.ODOOD_DLANG_COMPILER }} | |
- name: Install system dependencies | |
uses: lyricwulf/abc@v1 | |
with: | |
linux: libzip-dev libpq-dev python3-dev | |
- name: Build Odood | |
run: | | |
dub build -b unittest-cov -c unittest-integration-ut | |
- name: Upload Odood compiled assets | |
uses: actions/upload-artifact@v4 | |
with: | |
name: odood-ubuntu-20.04 | |
path: | | |
build/odood-unittest-integration-ut | |
# Run integration tests for different operation systems | |
run-integration-tests: | |
name: Run integration tests | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- "debian:bullseye" | |
- "ubuntu:20.04" | |
- "ubuntu:22.04" | |
- "ubuntu:24.04" | |
runs-on: ubuntu-22.04 | |
needs: | |
- compile-ubuntu-20_04 | |
container: | |
image: ${{ matrix.image }} | |
env: | |
DEBIAN_FRONTEND: 'noninteractive' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Download artifacts for ubuntu 20.04' | |
uses: actions/download-artifact@v4 | |
with: | |
name: odood-ubuntu-20.04 | |
path: build | |
- name: Update apt registry | |
run: apt-get update | |
- name: Install system dependencies (postgresql) | |
run: apt-get install --no-install-recommends -yq postgresql sudo | |
- name: Install package dependencies | |
run: apt-get install --no-install-recommends -yq $(cat .ci/deps/universal-deb.txt) | |
- name: Start postgresql | |
run: /etc/init.d/postgresql start | |
- name: Create default role for postgresql | |
run: sudo -u postgres -H psql -c "CREATE USER odoo WITH SUPERUSER PASSWORD 'odoo';" | |
- name: Make test build executable | |
run: chmod a+x ./build/odood-unittest-integration-ut | |
- name: List available tests | |
run: ./build/odood-unittest-integration-ut --list | |
- name: Run tests | |
run: ./build/odood-unittest-integration-ut --chrono | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: integration-unittests-${{ matrix.image }} | |
name: odood-integration-unittests-${{ matrix.image }} |