ci: Update codecov and checkout actions

The coverage job fails because of the outdated codecov action and the
checkout v2 action uses a deprecated version of nodejs
This commit is contained in:
patrick96 2023-02-13 21:51:18 +01:00 committed by Patrick Ziegler
parent fc423c0921
commit b3cbf0a644
3 changed files with 14 additions and 10 deletions

View File

@ -14,7 +14,7 @@ jobs:
env: env:
COLOR: "ON" COLOR: "ON"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs.ref }}
- name: Install Dependencies - name: Install Dependencies
@ -48,7 +48,7 @@ jobs:
python3-xcbgen \ python3-xcbgen \
libuv1-dev \ libuv1-dev \
xcb-proto xcb-proto
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs.ref }}
@ -115,7 +115,7 @@ jobs:
if [ "$POLYBAR_BUILD_TYPE" = "tests" ]; then if [ "$POLYBAR_BUILD_TYPE" = "tests" ]; then
sudo apt-get install -y lcov sudo apt-get install -y lcov
fi fi
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs.ref }}
@ -125,7 +125,7 @@ jobs:
run: ./common/ci/configure.sh run: ./common/ci/configure.sh
- name: Build - name: Build
run: | run: |
cd $BUILD_DIR cd "$BUILD_DIR"
make make
- name: Collect initial coverage - name: Collect initial coverage
if: ${{ matrix.polybar_build_type == 'tests' }} if: ${{ matrix.polybar_build_type == 'tests' }}
@ -134,17 +134,17 @@ jobs:
- name: Tests - name: Tests
if: ${{ matrix.polybar_build_type == 'tests' }} if: ${{ matrix.polybar_build_type == 'tests' }}
run: | run: |
cd $BUILD_DIR cd "$BUILD_DIR"
make check make check
- name: Collect coverage - name: Collect coverage
if: ${{ matrix.polybar_build_type == 'tests' }} if: ${{ matrix.polybar_build_type == 'tests' }}
run: | run: |
lcov --capture --no-external --directory . -o cov_tests.info lcov --capture --no-external --directory . -o cov_tests.info
lcov --add-tracefile cov_base.info --add-tracefile cov_tests.info -o cov_total.info lcov --add-tracefile cov_base.info --add-tracefile cov_tests.info -o cov_total.info
lcov --remove cov_total.info ${PWD}'/build/*' ${PWD}'/tests/*' ${PWD}'/lib/*' -o cov.info lcov --remove cov_total.info "${PWD}/build/*" "${PWD}/tests/*" "${PWD}/lib/*" -o cov.info
- name: Upload Coverage - name: Upload Coverage
if: ${{ matrix.polybar_build_type == 'tests' }} if: ${{ matrix.polybar_build_type == 'tests' }}
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
with: with:
flags: unittests flags: unittests
files: ./cov.info files: ./cov.info

View File

@ -31,9 +31,11 @@ jobs:
RELEASE_TAG=${GITHUB_REF#refs/tags/} RELEASE_TAG=${GITHUB_REF#refs/tags/}
fi fi
echo "Publishing Version $RELEASE_TAG" echo "Publishing Version $RELEASE_TAG"
echo "RELEASE_TAG=$RELEASE_TAG" >> "$GITHUB_ENV" {
echo "POLYBAR_DIR=polybar-$RELEASE_TAG" >> "$GITHUB_ENV" echo "RELEASE_TAG=$RELEASE_TAG"
echo "POLYBAR_ARCHIVE=polybar-$RELEASE_TAG.tar.gz" >> "$GITHUB_ENV" echo "POLYBAR_DIR=polybar-$RELEASE_TAG"
echo "POLYBAR_ARCHIVE=polybar-$RELEASE_TAG.tar.gz"
} >> "$GITHUB_ENV"
# Checks out the target tag # Checks out the target tag
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -1,5 +1,7 @@
#include "x11/xresources.hpp" #include "x11/xresources.hpp"
#include "common.hpp"
POLYBAR_NS POLYBAR_NS
template <> template <>