Skip to content

Commit

Permalink
chores: update ci
Browse files Browse the repository at this point in the history
ignore merge conflict files
remove git from dockerfile
update workflows
  • Loading branch information
maurerle committed Nov 29, 2024
1 parent 074a50a commit 737f2ec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ env:
jobs:

oci:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ ! (startsWith(github.actor, 'dependabot') || github.event.pull_request.head.repo.fork ) }}

steps:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Cache OCI layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand All @@ -104,7 +104,7 @@ jobs:
password: ${{ github.token }}

- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.RECIPE_PATH }}/Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
max-parallel: 5
matrix:
python-version: ['3.6', '3.11']
python-version: ['3.9', '3.13']

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set timezone
uses: szenius/set-timezone@v1.0
uses: szenius/set-timezone@v2.0

- name: Run tests
run: make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

.DS_Store
gecko.log
*.orig
21 changes: 6 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM python:3.11-slim-bullseye
FROM python:3.13-slim

ENV DEBIAN_FRONTEND noninteractive
ENV TERM linux
ENV DEBIAN_FRONTEND=noninteractive
ENV TERM=linux

# Install distribution packages, with caching.
# `git` is needed for `versioningit`.
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN \
--mount=type=cache,id=apt,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=apt,sharing=locked,target=/var/lib/apt \
true \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests --yes git ffmpeg firefox-esr xauth xvfb
&& apt-get install --no-install-recommends --no-install-suggests --yes ffmpeg firefox-esr xauth xvfb

# Copy sources
COPY . /src
Expand All @@ -20,16 +19,8 @@ COPY . /src
RUN \
--mount=type=cache,id=pip,target=/root/.cache/pip \
true \
&& pip install --use-pep517 --prefer-binary '/src'

# Uninstall Git again.
RUN apt-get --yes remove --purge git && apt-get --yes autoremove

# Purge /src and /tmp directories.
RUN rm -rf /src /tmp/*

# Add Tini.
ENV TINI_VERSION v0.19.0
&& pip install -e '/src'
ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ test = [
"freezegun >=1, <2",
]


[project.scripts]
grafanimate = "grafanimate.commands:run"

[project.urls]
Homepage = "https://github.com/grafana-toolbox/grafanimate"
Repository = "https://github.com/grafana-toolbox/grafanimate"
Issues = "https://github.com/grafana-toolbox/grafanimate/issues"


[tool.setuptools]
packages = {find = {}}

Expand Down
5 changes: 0 additions & 5 deletions requirements-release.txt

This file was deleted.

0 comments on commit 737f2ec

Please sign in to comment.