Preparation for Release 29 #159
Workflow file for this run
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
name: Review-checks | |
on: [pull_request] | |
jobs: | |
check-pylint: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/beaker/beaker-lint | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Run Pylint | |
run: | | |
set -o pipefail | |
Misc/run-pylint.sh --reports=n --disable=W \ | |
--extension-pkg-whitelist=lxml \ | |
bkr.server bkr.labcontroller bkr.client bkr.common \ | |
| tee pylint.out | |
check-docs: | |
runs-on: ubuntu-latest | |
container: | |
image: centos:7 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install utils | |
run: | | |
yum install -y git wget ca-certificates | |
- name: Fetch Beaker repository | |
run: | | |
wget https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo -P /etc/yum.repos.d/ | |
- name: Install Beaker dependency from specfile | |
run: | | |
yum-builddep *.spec -y | |
- name: Build documentation | |
run: | | |
make -C documentation html SPHINXOPTS="-W" | |
mv documentation/_build/html /__w | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: beaker-docs | |
path: /home/runner/work/html | |
integration-tests: | |
runs-on: ubuntu-latest | |
env: | |
MYSQL_USER: beaker | |
MYSQL_PASSWORD: beaker | |
MYSQL_ROOT_PASSWORD: toor | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["centos:7"] | |
test-target: ["bkr.inttest.client", "bkr.inttest.labcontroller"] | |
container: | |
image: ${{ matrix.os }} | |
services: | |
database: | |
image: mariadb:latest | |
env: | |
MYSQL_USER: ${{ env.MYSQL_USER }} | |
MYSQL_PASSWORD: ${{ env.MYSQL_PASSWORD }} | |
MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_ROOT_PASSWORD }} | |
ports: | |
- 3306 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout submodules | |
run: | | |
git submodule update --init --recursive | |
- name: Add Beaker Server YUM repository | |
run: | | |
curl -o /etc/yum.repos.d/beaker-server.repo https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo | |
- name: Install Beaker dependencies | |
run: | | |
yum install epel-release mariadb beaker-integration-tests -y | |
yum-builddep beaker.spec -y | |
yum remove beaker-common \ | |
beaker-client \ | |
beaker-lab-controller \ | |
beaker-server \ | |
beaker-integration-tests -y | |
- name: Configure database for testing | |
run: | | |
set -x | |
cat <<EOT > init.sql | |
CREATE DATABASE beaker_test; | |
CREATE DATABASE beaker_migration_test; | |
GRANT ALL PRIVILEGES ON beaker_test.* TO 'beaker'@'%'; | |
GRANT ALL PRIVILEGES ON beaker_migration_test.* TO 'beaker'@'%'; | |
EOT | |
mysql -uroot -p${{ env.MYSQL_ROOT_PASSWORD }} -h database < init.sql | |
sed -i 's/@localhost/@database/g' IntegrationTests/server-test.cfg | |
cat IntegrationTests/server-test.cfg | |
- name: Run integration tests for ${{ matrix.test-target }} | |
run: | | |
pushd IntegrationTests | |
./run-tests.sh ${{ matrix.test-target }} |