Skip to content

Commit

Permalink
use lib
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlepied committed Dec 15, 2023
1 parent 1d8b06c commit 3cd1471
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---

name: Build and test a PR

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Clone extra repos
run: |
set -ex
mkdir path
cd path
git clone --depth=1 "https://softwarefactory-project.io/r/dci-openshift-agent"
git clone --depth=1 https://gitlab.com/adblockinc/ext/adblockplus/spec.git
pwd
ls -l
- name: Extract dependent PR
uses: depends-on/depends-on-action@extra-dirs
with:
token: ${{ secrets.GITHUB_TOKEN }}
extra-dirs: pyprog/path/dci-openshift-agent pyprog/path/spec

- name: Run build and test
run: |
set -e
python3 -m venv .venv
. .venv/bin/activate
set -x
pip install -r requirements.txt
python3 prog.py
check-all-dependencies-are-merged:
runs-on: ubuntu-latest
steps:

- name: Extract dependent PR
uses: depends-on/depends-on-action@extra-dirs
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-unmerged-pr: true

...
4 changes: 3 additions & 1 deletion prog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import sys

print("Hello, world!", file=sys.stderr)
import lib

print(lib.message("World"), file=sys.stderr)

# prog.py ends here
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib

0 comments on commit 3cd1471

Please sign in to comment.