Skip to content

Update tested distribution versions and dependencies #10

Update tested distribution versions and dependencies

Update tested distribution versions and dependencies #10

Workflow file for this run

name: Exaile CI
on: [push, pull_request]
jobs:
lint:
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install black
- name: Check format
run: make check_format
test:
strategy:
matrix:
imgtag:
- debian-11
- debian-stable
- fedora-37
- fedora-latest
- ubuntu-20.04
- ubuntu-rolling
timeout-minutes: 4
runs-on: ubuntu-latest
container: ghcr.io/exaile/exaile-testimg:${{ matrix.imgtag }}
steps:
- uses: actions/checkout@v2
- name: Build and run tests
# Exaile has tests for file permissions that fail when run as root, so
# we de-escalate manually here.
# This requires the image to already have a user named `exaile`, created
# using e.g. `useradd -MN exaile`.
run: |
chown -R exaile .
export HOME=/tmp/home
su -m exaile -c "make BUILDDIR=/tmp/build test test_compile check-doc"
deploy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: [lint, test]
timeout-minutes: 2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends python3-gi
- id: dist
name: Create source dist archive
run: |
version=${GITHUB_REF#refs/*/}
printf '::set-output name=version::%s\n' "${version}"
make DIST_VERSION="$version" dist
checksum=$(cd dist && sha256sum --tag *)
printf '::set-output name=checksum::%s\n' "${checksum}"
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version='${{ steps.dist.outputs.version }}'
notes='```
${{ steps.dist.outputs.checksum }}
```'
gh release create \
"${version}" \
"dist/exaile-${version}.tar.gz" \
--draft \
--title "Exaile ${version}" \
--notes "${notes}"
# TODO: Waiting for https://github.com/Shizmob/pydle/issues/151
# notify:
# if: always() && github.repository_owner == 'exaile'
# needs: [lint, test, deploy]
# timeout-minutes: 1
# runs-on: ubuntu-latest
# steps:
# - name: Install dependencies
# run: pip3 install pydle
# - name: Send IRC notification
# run: |
# printf '%s | lint %s | test %s | deploy %s | %s' \
# "${GITHUB_REF#refs/*/}" \
# '${{ needs.lint.result }}' \
# '${{ needs.test.result }}' \
# '${{ needs.deploy.result }}' \
# 'http://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' \
# | python3 -m pydle.utils.irccat \
# --port 6697 \
# --tls --verify-tls \
# --nickname 'exaile-ci' \
# --channel '#exaile' \
# chat.freenode.net