Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/charset-normalizer-3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos authored Oct 30, 2023
2 parents a5c942c + 8516009 commit 06df444
Show file tree
Hide file tree
Showing 6 changed files with 2,461 additions and 528 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
ignore:
- dependency-name: "django"
update-types: [ "version-update:semver-major", "version-update:semver-minor" ] # only allow auto update on django bug and security fixes
open-pull-requests-limit: 10

- package-ecosystem: "npm"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
108 changes: 21 additions & 87 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ env:
jobs:
flake8:
name: Check python linting
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.6
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.6' # lint with minimal version supported (3.6 in 18.04)
python-version: '3.8' # lint with minimal version supported (3.6 in 18.04)
- name: Install dependencies
run: |
echo "${{ github.event_name }}! ${{ github.event.action }}"
Expand All @@ -39,14 +39,14 @@ jobs:
run: |
flake8 src
eslint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
name: Check javascript linting
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14
- name: Install dependencies
Expand All @@ -61,16 +61,14 @@ jobs:
needs: [flake8, eslint]
strategy:
matrix:
os: ['ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04']
os: ['ubuntu-20.04', 'ubuntu-22.04']
include:
- os: 'ubuntu-18.04'
python-version: '3.6' # default python version in 18.04
- os: 'ubuntu-20.04'
python-version: '3.8' # default python version in 20.04
- os: 'ubuntu-22.04'
python-version: '3.10' # default python version in 22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -99,44 +97,18 @@ jobs:
runs-on: ubuntu-20.04
needs: [test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build -t screamshotter_ci:latest .
- name: Upload image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "screamshotter_ci:latest"
build_deb_18_04:
name: Build 18.04 package
runs-on: ubuntu-latest
container: ubuntu:bionic
env:
LANG: C.UTF-8
needs: [test]
steps:
- uses: actions/checkout@v3
- name: Prepare debian 18.04 versioning
run: |
sed -i 's/+dev/.ubuntu18.04~dev'$GITHUB_RUN_ID'/' debian/changelog
sed -i 's/screamshotter (\([0-9]\+\.[0-9]\+\.[0-9]\+\)\(.*\)) RELEASED;/screamshotter (\1.ubuntu18.04\2) bionic;/' debian/changelog
- name: Install build dependencies
run: |
apt-get update -q
apt-get install -q -y dpkg-dev debhelper dh-virtualenv git python3 python3-venv python3-dev libgtk-3-0 libasound2 libgbm1 libxshmfence1
- name: Building package debian 18.04
run: |
dpkg-buildpackage -uc -us -b
- name: Archive package artifact
uses: actions/upload-artifact@v2
with:
name: debian-18-04
path: |
/home/runner/work/screamshotter/*.deb

build_deb_20_04:
name: Build 20.04 package
runs-on: ubuntu-latest
Expand All @@ -145,7 +117,7 @@ jobs:
env:
LANG: C.UTF-8
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare debian 20.04 versioning
run: |
sed -i 's/+dev/.ubuntu20.04~dev'$GITHUB_RUN_ID'/' debian/changelog
Expand All @@ -160,7 +132,7 @@ jobs:
run: |
dpkg-buildpackage -uc -us -b
- name: Archive package artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: debian-20-04
path: |
Expand All @@ -173,7 +145,7 @@ jobs:
env:
LANG: C.UTF-8
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare debian 22.04 versioning
run: |
sed -i 's/+dev/.ubuntu22.04~dev'$GITHUB_RUN_ID'/' debian/changelog
Expand All @@ -186,7 +158,7 @@ jobs:
run: |
dpkg-buildpackage -uc -us -b
- name: Archive package artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: debian-22-04
path: |
Expand Down Expand Up @@ -225,46 +197,12 @@ jobs:
exit 1;
fi
- name: Archive result artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: result-docker
path: |
/home/runner/work/screamshotter/screamshotter/google.png
e2e_deb_18_04:
name: Tests E2E 18.04
runs-on: ubuntu-18.04
needs: [ build_deb_18_04 ]
steps:
- uses: actions/download-artifact@v2
with:
name: debian-18-04
- name: Install package
run: |
sudo apt-get install -y /home/runner/work/screamshotter/screamshotter/*.deb
- name: E2E test
run: |
curl -d url=https://google.com http://localhost:8000 > google.png
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check result
run: |
pip install filetype
if filetype -f google.png |grep -q 'image/png'; then
echo "File is PNG";
exit 0;
else
echo "File is not PNG";
exit 1;
fi
- name: Archive result artifact
uses: actions/upload-artifact@v2
with:
name: result-18-04
path: |
/home/runner/work/screamshotter/screamshotter/google.png
e2e_deb_20_04:
name: Tests E2E 20.04
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -293,7 +231,7 @@ jobs:
exit 1;
fi
- name: Archive result artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: result-20-04
path: |
Expand Down Expand Up @@ -326,7 +264,7 @@ jobs:
exit 1;
fi
- name: Archive result artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: result-22-04
path: |
Expand All @@ -335,13 +273,9 @@ jobs:
deploy:
name: Publish (on release only)
runs-on: ubuntu-18.04
needs: [ e2e_docker_image, e2e_deb_18_04, e2e_deb_20_04, e2e_deb_22_04 ]
needs: [ e2e_docker_image, e2e_deb_20_04, e2e_deb_22_04 ]
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
steps:
- name: Download 18.04 debian artifact
uses: actions/download-artifact@v2
with:
name: debian-18-04
- name: Download 20.04 debian artifact
uses: actions/download-artifact@v2
with:
Expand All @@ -361,7 +295,7 @@ jobs:
with:
args: '*.deb'
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
Loading

0 comments on commit 06df444

Please sign in to comment.