Răsfoiți Sursa

more workflows

Nick Sweeting 5 ani în urmă
părinte
comite
90141c064b

+ 45 - 0
.github/workflows/debian.yml

@@ -0,0 +1,45 @@
+name: Debian
+
+on:
+  workflow_dispatch:
+  push:
+
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          recursive: true
+          fetch-depth: 1
+
+      - name: Set up Python
+        uses: actions/setup-python@v1
+        with:
+          python-version: 3.9
+          architecture: x64
+
+      - name: Build Debian/Apt package
+        run: |
+          sudo apt install -y dh-python
+          pip install --upgrade pip setuptools wheel stdeb
+          ./bin/build_deb.sh
+
+      - name: Install archivebox from deb
+        run: |
+          apt install deb_dist/archivebox*.deb
+
+      - name: Add some links to test
+        run: |
+          mkdir data && cd data
+          archivebox init
+          archivebox add 'https://example.com'
+          archivebox version
+          archivebox status
+
+      # TODO: push debian package to launchpad PPA
+      # - name: Push to launchpad
+      #   run: |
+      #     dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"

+ 1 - 1
.github/workflows/docker.yml

@@ -1,4 +1,4 @@
-name: Docker Push
+name: Docker
 
 on:
   workflow_dispatch:

+ 33 - 0
.github/workflows/homebrew.yml

@@ -0,0 +1,33 @@
+name: Homebrew
+
+on:
+  workflow_dispatch:
+  push:
+
+
+jobs:
+  build:
+    runs-on: macos-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          recursive: true
+          fetch-depth: 1
+
+      - name: Build Homebrew Bottle
+        run: |
+          pip3 install --uprade pip setuptools wheel
+          cd brew_dist/
+          brew install --build-bottle ./archivebox.rb
+          brew bottle archivebox
+
+      - name: Add some links to test
+        run: |
+          mkdir data && cd data
+          archivebox init
+          archivebox add 'https://example.com'
+          archivebox version
+          archivebox status
+
+      # TODO: push bottle to Github and open homebrew core PR with latest changes

+ 6 - 3
.github/workflows/lint.yml

@@ -1,5 +1,8 @@
-name: 'Lint'
-on: [push]
+name: Lint
+
+on:
+  workflow_dispatch:
+  push:
 
 env:
   MAX_LINE_LENGTH: 110
@@ -16,7 +19,7 @@ jobs:
       - name: Set up Python
         uses: actions/setup-python@v1
         with:
-          python-version: 3.8
+          python-version: 3.9
           architecture: x64
 
       - name: Install flake8

+ 41 - 0
.github/workflows/pip.yml

@@ -0,0 +1,41 @@
+name: Pip
+
+on:
+  workflow_dispatch:
+  push:
+
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          recursive: true
+          fetch-depth: 1
+
+      - name: Set up Python
+        uses: actions/setup-python@v1
+        with:
+          python-version: 3.9
+          architecture: x64
+
+      - name: Build Python Package
+        run: |
+          pip3 install --uprade pip setuptools wheel
+          python3 setup.py \
+            sdist --dist-dir=./pip_dist \
+            bdist_wheel --dist-dir=./pip_dist \
+            egg_info --egg-base=./pip_dist
+          pip install pip_dist/archivebox-*.whl
+
+      - name: Add some links to test
+        run: |
+          mkdir data && cd data
+          archivebox init
+          archivebox add 'https://example.com'
+          archivebox version
+          archivebox status
+
+      # TODO: push to PyPI with twine

+ 0 - 1
bin/build_brew.sh

@@ -12,7 +12,6 @@ IFS=$'\n'
 
 REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
 
-source "$REPO_DIR/.venv/bin/activate"
 cd "$REPO_DIR/brew_dist"