Nightly Latest #742
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: Nightly Latest | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# runs at 4:00 UTC daily | |
- cron: '00 4 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
- TEST: pulp | |
- TEST: azure | |
- TEST: s3 | |
outputs: | |
deprecations-pulp: ${{ steps.deprecations.outputs.deprecations-pulp }} | |
deprecations-azure: ${{ steps.deprecations.outputs.deprecations-azure }} | |
deprecations-s3: ${{ steps.deprecations.outputs.deprecations-s3 }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# by default, it uses a depth of 1 | |
# this fetches all history so that we can read each commit | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install httpie | |
run: | | |
echo ::group::HTTPIE | |
sudo apt-get update -yq | |
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie | |
echo ::endgroup:: | |
echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV | |
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV | |
- name: Before Install | |
run: .github/workflows/scripts/before_install.sh | |
shell: bash | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
GITHUB_PULL_REQUEST: ${{ github.event.number }} | |
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} | |
GITHUB_BRANCH: ${{ github.head_ref }} | |
GITHUB_REPO_SLUG: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} | |
- uses: actions/setup-ruby@v1 | |
if: ${{ env.TEST == 'bindings' || env.TEST == 'generate-bindings' }} | |
with: | |
ruby-version: "2.6" | |
- name: Install | |
run: .github/workflows/scripts/install.sh | |
shell: bash | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
GITHUB_PULL_REQUEST: ${{ github.event.number }} | |
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} | |
GITHUB_BRANCH: ${{ github.head_ref }} | |
GITHUB_REPO_SLUG: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} | |
- name: Before Script | |
run: .github/workflows/scripts/before_script.sh | |
shell: bash | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
GITHUB_PULL_REQUEST: ${{ github.event.number }} | |
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} | |
GITHUB_BRANCH: ${{ github.head_ref }} | |
GITHUB_REPO_SLUG: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} | |
- name: Setting secrets | |
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT" | |
env: | |
SECRETS_CONTEXT: ${{ toJson(secrets) }} | |
- name: Install Python client | |
run: .github/workflows/scripts/install_python_client.sh | |
shell: bash | |
- name: Install Ruby client | |
if: ${{ env.TEST == 'bindings' || env.TEST == 'generate-bindings' }} | |
run: .github/workflows/scripts/install_ruby_client.sh | |
shell: bash | |
- name: Script | |
run: .github/workflows/scripts/script.sh | |
shell: bash | |
env: | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
GITHUB_PULL_REQUEST: ${{ github.event.number }} | |
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} | |
GITHUB_BRANCH: ${{ github.head_ref }} | |
GITHUB_REPO_SLUG: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} | |
- name: Extract Deprecations from Logs | |
id: deprecations | |
run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)" | |
- name: Logs | |
if: always() | |
run: | | |
echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate" | |
http --timeout 30 --check-status --pretty format --print hb https://pulp/pulp/api/v3/status/ || true | |
docker images || true | |
docker ps -a || true | |
docker logs pulp || true | |
docker exec pulp ls -latr /etc/yum.repos.d/ || true | |
docker exec pulp cat /etc/yum.repos.d/* || true | |
docker exec pulp pip3 list | |
deprecations: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: test | |
steps: | |
- name: Fail on deprecations | |
run: | | |
test -z "${{ needs.test.outputs.deprecations-pulp }}" | |
test -z "${{ needs.test.outputs.deprecations-azure }}" | |
test -z "${{ needs.test.outputs.deprecations-s3 }}" | |
- name: Print deprecations | |
if: failure() | |
run: | | |
echo "${{ needs.test.outputs.deprecations-pulp }}" | base64 -d | |
echo "${{ needs.test.outputs.deprecations-azure }}" | base64 -d | |
echo "${{ needs.test.outputs.deprecations-s3 }}" | base64 -d |