Skip to content

build(deps): bump actions/checkout from 3 to 4 #98

build(deps): bump actions/checkout from 3 to 4

build(deps): bump actions/checkout from 3 to 4 #98

Workflow file for this run

name: Run validation tests
on: pull_request
permissions:
contents: read
jobs:
unit-tests:
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# * Don't forget to copypaste also the same matrix below in rpm tests!
# * Replace current branch in "release" with empty string. This makes name of the check for
# the current branch always have the same name, so that it can be added to required
# checks.
# * For various branches, comment out what does not apply:
# on -devel, run everything
# on -release, only -release
# on master, only master and ELN
#release: [master, eln, '', f34-release]
release: ['']
include:
- release: ''
target_branch: 'master'
ci_tag: 'master'
#- release: eln
# target_branch: 'master'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
#- release: ''
# target_branch: 'f35-devel'
# ci_tag: 'f35-devel'
#- release: f35-release
# target_branch: 'f35-release'
# ci_tag: 'f35-release'
env:
CI_TAG: '${{ matrix.ci_tag }}'
# Always avoid using cache because cache is not correctly invalidated.
CONTAINER_BUILD_ARGS: '--no-cache ${{ matrix.build-args }}'
TARGET_BRANCH_NAME: 'origin/${{ matrix.target_branch }}'
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# TODO: Are we able to remove ref, fetch-depth and Rebase task? Seems that the checkout
# without ref is doing the rebase for us.
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase to current ${{ env.TARGET_BRANCH_NAME }}
run: |
git config user.name github-actions
git config user.email [email protected]
git log --oneline -1 ${{ env.TARGET_BRANCH_NAME }}
git rebase ${{ env.TARGET_BRANCH_NAME }}
- name: Check if rebuild of the container image is required
id: check-dockerfile-changed
run: |
changes=$(git diff $TARGET_BRANCH_NAME..HEAD -- dockerfile/anaconda-ci/ anaconda.spec.in scripts/testing/install_dependencies.sh)
# print for debugging
echo "$changes"
[ -z "$changes" ] || echo "::set-output name=changed::true"
# build container if files for dockerfile changed in the PR
- name: Build anaconda-ci container
if: steps.check-dockerfile-changed.outputs.changed
run: make -f Makefile.am anaconda-ci-build
- name: Run tests in anaconda-ci container
run: |
# put the log in the output, where it's easy to read and link to
make -f Makefile.am container-ci || { cat test-logs/test-suite.log; exit 1; }
- name: Upload test and coverage logs
if: always()
uses: actions/upload-artifact@v3
with:
name: 'logs (${{ matrix.ci_tag }})'
path: test-logs/*
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
rpm-tests:
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# For matrix details, see comments for the unit tests above.
#release: [master, eln, '', f34-release]
release: ['']
include:
- release: ''
target_branch: 'master'
ci_tag: 'master'
#- release: eln
# target_branch: 'master'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
#- release: ''
# target_branch: 'f35-devel'
# ci_tag: 'f35-devel'
#- release: f35-release
# target_branch: 'f35-release'
# ci_tag: 'f35-release'
env:
CI_TAG: '${{ matrix.ci_tag }}'
# Always avoid using cache because cache is not correctly invalidated.
CONTAINER_BUILD_ARGS: '--no-cache ${{ matrix.build-args }}'
TARGET_BRANCH_NAME: 'origin/${{ matrix.target_branch }}'
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# TODO: Are we able to remove ref, fetch-depth and Rebase task? Seems that the checkout
# without ref is doing the rebase for us.
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase to current ${{ env.TARGET_BRANCH_NAME }}
run: |
git config user.name github-actions
git config user.email [email protected]
git log --oneline -1 ${{ env.TARGET_BRANCH_NAME }}
git rebase ${{ env.TARGET_BRANCH_NAME }}
- name: Build RPM test container
run: make -f Makefile.am anaconda-rpm-build
- name: Run RPM tests in container
run: make -f Makefile.am container-rpm-test
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v3
with:
name: 'logs-rpm-test (${{ matrix.ci_tag }})'
path: test-logs/*