Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework some sharp edges in GitHub Actions #198

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,8 @@ on:


jobs:
bionic-ci:
ci:
runs-on: ubuntu-20.04
name: Focal Aptly ${{ matrix.job_type }} -
debug ${{ matrix.show_debug_cmds }}
strategy:
matrix:
show_debug_cmds:
- true
- false
job_type:
- 'CI'
- 'CONFIG_TESTER'
exclude:
- job_type: 'CONFIG_TESTER'
show_debug_cmds: false
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -68,22 +55,32 @@ jobs:
gpg --gen-key --batch genkey

# CI TESTING
- name: Run CI tests
if: ${{ matrix.job_type == 'CI' }}
- name: Run software testsuite
if: ${{ github.event_name != 'pull_request' }}
run: |
python3 scripts/aptly/aptly_importer_TEST.py
env:
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: ${{ matrix.show_debug_cmds }}
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: false
_ALLOW_DESTRUCTIVE_TESTS_REPREPRO_UPDATER_TEST_SUITE_: true

# CI TESTING (debug)
- name: Run CI tests (debug)
if: ${{ github.event_name != 'pull_request' }}
run: |
python3 scripts/aptly/aptly_importer_TEST.py
env:
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: true
_ALLOW_DESTRUCTIVE_TESTS_REPREPRO_UPDATER_TEST_SUITE_: true

# CONFIG FILE TESTER
- name: Idenfify files changed in this PR.
id: files
if: ${{ matrix.job_type == 'CONFIG_TESTER' }}
if: ${{ github.event_name == 'pull_request' }}
run: |
git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }}
echo "::set-output name=changed-files::$(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }}| tr '\n' ' ')"
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}... | tr '\n' ' ')
echo "changed-files=$CHANGED_FILES" | tee $GITHUB_OUTPUT
- name: Run testing on changed config files
if: ${{ matrix.job_type == 'CONFIG_TESTER' }}
if: ${{ github.event_name == 'pull_request' }}
run: |
for changed_file in ${{ steps.files.outputs.changed-files }}; do
if [[ ${changed_file} != ${changed_file/config\/*.yaml} ]]; then
Expand Down
Loading