Skip to content

Print docker images info in CI for future reference #4789

Print docker images info in CI for future reference

Print docker images info in CI for future reference #4789

Workflow file for this run

name: testing
on:
push:
branches: master
pull_request:
permissions: read-all
jobs:
sqlite:
name: sqlite / english
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
kiwitcms-url: [tcms.kiwitcms.org, public.tenant.kiwitcms.org]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Configure ~/.tcms.conf for ${{ matrix.kiwitcms-url }}
run: |
echo "[tcms]" > ~/.tcms.conf
echo "url = https://${{ matrix.kiwitcms-url }}/xml-rpc/" >> ~/.tcms.conf
echo "username = kiwitcms-bot" >> ~/.tcms.conf
echo "password = ${{ secrets.TCMS_PASSWORD }}" >> ~/.tcms.conf
- name: Execute tests
run: |
sudo apt-get update
sudo apt-get install gettext
sudo mkdir /Kiwi
sudo chmod a+w /Kiwi
pip install -r requirements/devel.txt
pushd tcms/ && npm install --dev && ./node_modules/.bin/webpack && popd
pushd tcms/ && ./npm-install && popd
export LANG=en-us
# report to Kiwi TCMS only if we have access to secrets
if [ -n "${{ secrets.TCMS_PASSWORD }}" ]; then
pip install kiwitcms-django-plugin
export DJANGO_TEST_RUNNER="tcms_django_plugin.TestRunner"
export TCMS_PRODUCT=$GITHUB_REPOSITORY
# branch name or pull/123
export TCMS_PRODUCT_VERSION=$(echo $GITHUB_REF | sed "s|refs/heads/||" | sed "s|refs/||" | sed "s|/merge||")
# short commit number
export TCMS_BUILD=$(echo $GITHUB_SHA | cut -c1-7)
fi
make test
coverage report -m
- name: Send coverage to codecov.io
if: env.HAS_TOKEN
uses: codecov/codecov-action@v3
env:
HAS_TOKEN: ${{ secrets.HAS_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
check_for_unapplied_migrations:
name: check for unapplied migrations
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
sudo apt-get update
sudo apt-get install gettext
pip install -r requirements/devel.txt
pushd tcms/ && npm install --dev && ./node_modules/.bin/webpack && popd
pushd tcms/ && ./npm-install && popd
- name: Run test
run: |
export LANG=en-us
export TEST_DASHBOARD_CHECK_UNAPPLIED_MIGRATIONS=1
coverage run --source='.' ./manage.py test -v2 --noinput --settings=tcms.settings.test tcms.core.tests.test_views.TestDashboardCheckMigrations
coverage report -m
- name: Send coverage to codecov.io
if: env.HAS_TOKEN
uses: codecov/codecov-action@v3
env:
HAS_TOKEN: ${{ secrets.HAS_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
without_internal_bugtracker:
name: without internal bugtracker
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Execute tests
run: |
sudo apt-get update
sudo apt-get install gettext
sudo mkdir /Kiwi
sudo chmod a+w /Kiwi
pip install -r requirements/devel.txt
pushd tcms/ && npm install --dev && ./node_modules/.bin/webpack && popd
pushd tcms/ && ./npm-install && popd
export LANG=en-us
export KIWI_DISABLE_BUGTRACKER=yes
make test
coverage report -m
- name: Send coverage to codecov.io
if: env.HAS_TOKEN
uses: codecov/codecov-action@v3
env:
HAS_TOKEN: ${{ secrets.HAS_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
mariadb:
name: mariadb / slovenian
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create database
run: |
docker-compose pull db
docker-compose run -d -p 3306:3306 --name kiwi_db db
docker images
sleep 20 # wait to initialize
docker exec -i kiwi_db mariadb -u root -pkiwi-1s-aw3s0m3 -e 'GRANT ALL PRIVILEGES ON test_kiwi.* TO kiwi;'
- name: Execute tests
run: |
sudo apt-get update
sudo apt-get install gettext
sudo mkdir /Kiwi
sudo chmod a+w /Kiwi
pip install -r requirements/devel.txt
pip install -r requirements/mariadb.txt
pushd tcms/ && npm install --dev && ./node_modules/.bin/webpack && popd
pushd tcms/ && ./npm-install && popd
export LANG=sl-si
TEST_DB=MariaDB make test
coverage report -m
- name: Send coverage to codecov.io
if: env.HAS_TOKEN
uses: codecov/codecov-action@v3
env:
HAS_TOKEN: ${{ secrets.HAS_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
postgres:
name: postgres / french
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create database
run: |
docker-compose -f docker-compose.postgres pull db
docker-compose -f docker-compose.postgres run -d -p 5432:5432 --name kiwi_db db
docker images
- name: Execute tests
run: |
sudo apt-get update
sudo apt-get install gettext
sudo mkdir /Kiwi
sudo chmod a+w /Kiwi
pip install -r requirements/devel.txt
pip install -r requirements/postgres.txt
pushd tcms/ && npm install --dev && ./node_modules/.bin/webpack && popd
pushd tcms/ && ./npm-install && popd
export LANG=fr-fr
TEST_DB=Postgres make test
coverage report -m
- name: Send coverage to codecov.io
if: env.HAS_TOKEN
uses: codecov/codecov-action@v3
env:
HAS_TOKEN: ${{ secrets.HAS_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
docker:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup
run: |
sudo apt-get update
sudo apt-get install firefox wrk
- name: Docker version info
run: |
docker --version
docker --help
docker-compose --version
docker-compose --help
- name: Execute tests
run: |
pip install -r requirements/devel.txt
make test-docker-image
docker images
- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: wrk-logs
path: ./wrk-logs-*/