Skip to content

Update publish-docker-image-tests.yml #1492

Update publish-docker-image-tests.yml

Update publish-docker-image-tests.yml #1492

Workflow file for this run

name: Tool Tests
env:
MICROSOFT_EMAIL: gindibay@microsoft.com
USER_NAME: Gurkan Indibay
MAIN_BRANCH: all-citus
on:
push:
branches:
- "**"
workflow_dispatch:
jobs:
make-install:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install all scripts
run: make && sudo make install
unit_test_execution:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Create GitHub App token
id: app
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.app.outputs.token }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Define git credentials
run: git config --global user.email "${MICROSOFT_EMAIL}"&& git config --global user.name "${USER_NAME}"
- name: Install package dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: Run static code analysis
run: python -m prospector
- name: Validate code format
run: black . --check
- name: Unit tests for "Common tools"
env:
GH_TOKEN: ${{steps.app.outputs.token}}
GITHUB_TOKEN: ${{steps.app.outputs.token}}
run: python -m pytest -q packaging_automation/tests/test_common_tool_methods.py
- name: Unit tests for "Update Package Properties"
env:
GH_TOKEN: ${{steps.app.outputs.token}}
GITHUB_TOKEN: ${{steps.app.outputs.token}}
run: python -m pytest -q packaging_automation/tests/test_update_package_properties.py
# no longer viable, outdated test, skipping to not block the pipeline
# - name: Unit tests for "Prepare Release"
# run: python -m pytest -q packaging_automation/tests/test_prepare_release.py
- name: Unit tests for "Update Docker"
env:
GH_TOKEN: ${{steps.app.outputs.token}}
GITHUB_TOKEN: ${{steps.app.outputs.token}}
run: python -m pytest -q packaging_automation/tests/test_update_docker.py
- name: Unit tests for "Update Pgxn"
env:
GH_TOKEN: ${{steps.app.outputs.token}}
GITHUB_TOKEN: ${{steps.app.outputs.token}}
run: python -m pytest -q packaging_automation/tests/test_update_pgxn.py
- name: Packaging Warning Handler
env:
GH_TOKEN: ${{steps.app.outputs.token}}
GITHUB_TOKEN: ${{steps.app.outputs.token}}
run: python -m pytest -q packaging_automation/tests/test_packaging_warning_handler.py