Skip to content

Bump actions/checkout from 3 to 4 #315

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #315

Workflow file for this run

name: Pull Request
on:
pull_request_target:
types:
- opened
- ready_for_review
- synchronize
- reopened
branches:
- develop
jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python-version: "3.9"
toxenv: "py39"
- python-version: "3.10"
toxenv: "py310"
- python-version: "3.11"
toxenv: "py311"
- python-version: "3.12.0-rc.2"
toxenv: "py312"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev
python3 -m pip install -r requirements.txt
- name: Functional test
env:
TOXENV: ${{ matrix.toxenv }}
PYTHON_VERSION: ${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 update.py
approve:
name: Approve pull request
runs-on: ubuntu-22.04
needs: build
if: github.actor == github.repository_owner || github.actor == 'dependabot[bot]'
steps:
- name: Approve
uses: hmarr/[email protected]
with:
github-token: "${{ github.actor == github.repository_owner && secrets.GITHUB_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }}"
merge:
name: Merge pull request
runs-on: ubuntu-22.04
needs: approve
if: github.actor == github.repository_owner || github.actor == 'dependabot[bot]'
steps:
- name: Merge
uses: actions/github-script@v6
with:
github-token: "${{ github.actor == github.repository_owner && secrets.GITHUB_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }}"
script: |
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
})