try action

This commit is contained in:
Erica Portnoy 2026-03-24 12:23:56 -07:00
parent 4de96cf22e
commit d4e9b4622d

View file

@ -80,50 +80,72 @@ jobs:
# - name: Run integration tests for Docker images
# run: set -e && tools/docker/test.sh ${{ env.dockerTag }} ${{ matrix.DOCKER_ARCH }}
# shell: bash
snaps_build:
runs-on:
- ubuntu-22.04
timeout-minutes: 0
snaps_build_action:
name: Snap build using action
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
SNAP_ARCH:
- amd64
- armhf
- arm64
arch: [amd64, arm64, armhf]
steps:
- name: checkout
uses: actions/checkout@v6.0.2
- name: Install dependencies
run: |-
set -e
sudo apt-get update
sudo apt-get install -y --no-install-recommends snapd
sudo snap install --classic snapcraft
- uses: actions/setup-python@v5.0.0
with:
python-version: '3.12'
- name: Build snaps
env:
SNAPCRAFT_STORE_CREDENTIALS: "${{ secrets.LAUNCHPAD_CREDENTIALS }}"
run: |-
set -e
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
python3 tools/snap/build_remote.py ALL --archs ${{ matrix.SNAP_ARCH }} --timeout ${{ env.snapBuildTimeout }}
- name: Prepare artifacts
run: |-
set -e
mv *.snap ${{ runner.temp }}
mv certbot-dns-*/*.snap ${{ runner.temp }}
- name: Store snaps artifacts
uses: actions/upload-artifact@v4.1.0
with:
name: snaps_${{ matrix.SNAP_ARCH }}
path: "${{ runner.temp }}"
- uses: actions/checkout@v6.0.2
- uses: snapcore/action-build@v1.3.0
id: build
with:
snapcraft-args: "--build-for=${{ matrix.arch }}"
- name: Prepare artifact
run: |-
set -e
mv *.snap ${{ runner.temp }}
- name: Store snap artifact
uses: actions/upload-artifact@v4.1.0
with:
name: snaps_${{ matrix.arch }}
path: "${{ runner.temp }}"
# snaps_build:
# runs-on:
# - ubuntu-22.04
# timeout-minutes: 0
# strategy:
# fail-fast: false
# matrix:
# SNAP_ARCH:
# - amd64
# - armhf
# - arm64
# steps:
# - name: checkout
# uses: actions/checkout@v6.0.2
# - name: Install dependencies
# run: |-
# set -e
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends snapd
# sudo snap install --classic snapcraft
# - uses: actions/setup-python@v5.0.0
# with:
# python-version: '3.12'
# - name: Build snaps
# env:
# SNAPCRAFT_STORE_CREDENTIALS: "${{ secrets.LAUNCHPAD_CREDENTIALS }}"
# run: |-
# set -e
# git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
# git config --global user.name "${{ github.actor }}"
# python3 tools/snap/build_remote.py ALL --archs ${{ matrix.SNAP_ARCH }} --timeout ${{ env.snapBuildTimeout }}
# - name: Prepare artifacts
# run: |-
# set -e
# mv *.snap ${{ runner.temp }}
# mv certbot-dns-*/*.snap ${{ runner.temp }}
# - name: Store snaps artifacts
# uses: actions/upload-artifact@v4.1.0
# with:
# name: snaps_${{ matrix.SNAP_ARCH }}
# path: "${{ runner.temp }}"
snap_run:
needs:
- snaps_build
- snaps_build_action
runs-on:
- ubuntu-22.04
steps:
@ -154,35 +176,35 @@ jobs:
run: |-
set -e
venv/bin/python -m tox run -e integration-external,apacheconftest-external-with-pebble
snap_dns_run:
needs:
- snaps_build
runs-on:
- ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v6.0.2
- name: Install dependencies
run: |-
set -e
sudo apt-get update
sudo apt-get install -y --no-install-recommends snapd
- uses: actions/setup-python@v5.0.0
with:
python-version: '3.12'
- name: Retrieve Certbot snaps
uses: actions/download-artifact@v8.0.1
with:
name: snaps_amd64
github_token: "${{ secrets.GITHUB_TOKEN }}"
path: "${{ github.workspace }}/snap"
repo: "${{ github.repository }}"
- name: Prepare Certbot-CI
run: |-
set -e
python3 -m venv venv
venv/bin/python tools/pip_install.py -e certbot-ci
- name: Test DNS plugins snaps
run: |-
set -e
sudo -E venv/bin/pytest certbot-ci/src/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder ${{ github.workspace }}/snap --snap-arch amd64
# snap_dns_run:
# needs:
# - snaps_build
# runs-on:
# - ubuntu-22.04
# steps:
# - name: checkout
# uses: actions/checkout@v6.0.2
# - name: Install dependencies
# run: |-
# set -e
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends snapd
# - uses: actions/setup-python@v5.0.0
# with:
# python-version: '3.12'
# - name: Retrieve Certbot snaps
# uses: actions/download-artifact@v8.0.1
# with:
# name: snaps_amd64
# github_token: "${{ secrets.GITHUB_TOKEN }}"
# path: "${{ github.workspace }}/snap"
# repo: "${{ github.repository }}"
# - name: Prepare Certbot-CI
# run: |-
# set -e
# python3 -m venv venv
# venv/bin/python tools/pip_install.py -e certbot-ci
# - name: Test DNS plugins snaps
# run: |-
# set -e
# sudo -E venv/bin/pytest certbot-ci/src/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder ${{ github.workspace }}/snap --snap-arch amd64