Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-05-21 09:56:42 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-05-21 09:56:42 +0200
commitf9ec8f2a2791b68f26bc858ccd6dea88720ae7c2 (patch)
treeccb8ff9acc6bb3cadaa59b1f4db9a377a51da08a /.github/workflows
parent129ceaea8be14362e2b22cbbf8b83ae0e392d1e8 (diff)
parent54a693be4fa2fbce83fd894b5ac3b0909f3a1e10 (diff)
Merging in latest changes from master and resolved conflicts.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/iso-build.yaml50
-rw-r--r--.github/workflows/lint-python.yaml40
-rw-r--r--.github/workflows/python-publish.yml32
3 files changed, 81 insertions, 41 deletions
diff --git a/.github/workflows/iso-build.yaml b/.github/workflows/iso-build.yaml
index 6b89a50c..106bac4a 100644
--- a/.github/workflows/iso-build.yaml
+++ b/.github/workflows/iso-build.yaml
@@ -9,12 +9,12 @@ on:
- main # In case we adopt this convention in the future
pull_request:
paths-ignore:
- - 'docs/**'
- - '**.editorconfig'
- - '**.gitignore'
- - '**.md'
- - 'LICENSE'
- - 'PKGBUILD'
+ - 'docs/**'
+ - '**.editorconfig'
+ - '**.gitignore'
+ - '**.md'
+ - 'LICENSE'
+ - 'PKGBUILD'
jobs:
build:
@@ -23,22 +23,22 @@ jobs:
image: archlinux:latest
options: --privileged
steps:
- - uses: actions/checkout@v2
- - run: pwd
- - run: find .
- - run: cat /etc/os-release
- - run: mkdir -p /tmp/archlive/airootfs/root/archinstall-git; cp -r . /tmp/archlive/airootfs/root/archinstall-git
- - run: echo "pip uninstall archinstall -y; cd archinstall-git; python setup.py install" > /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"This ISO was built from Git SHA $GITHUB_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: cat /tmp/archlive/airootfs/root/.zprofile
- - run: pacman -Sy; pacman --noconfirm -S git archiso
- - run: cp -r /usr/share/archiso/configs/releng/* /tmp/archlive
- - run: echo -e "git\npython\npython-pip\npython-setuptools" >> /tmp/archlive/packages.x86_64
- - run: find /tmp/archlive
- - run: cd /tmp/archlive; mkarchiso -v -w work/ -o out/ ./
- - uses: actions/upload-artifact@v2
- with:
- name: Arch Live ISO
- path: /tmp/archlive/out/*.iso
+ - uses: actions/checkout@v2
+ - run: pwd
+ - run: find .
+ - run: cat /etc/os-release
+ - run: mkdir -p /tmp/archlive/airootfs/root/archinstall-git; cp -r . /tmp/archlive/airootfs/root/archinstall-git
+ - run: echo "pip uninstall archinstall -y; cd archinstall-git; python setup.py install" > /tmp/archlive/airootfs/root/.zprofile
+ - run: echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile
+ - run: echo "echo \"This ISO was built from Git SHA $GITHUB_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile
+ - run: echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile
+ - run: cat /tmp/archlive/airootfs/root/.zprofile
+ - run: pacman -Sy; pacman --noconfirm -S git archiso
+ - run: cp -r /usr/share/archiso/configs/releng/* /tmp/archlive
+ - run: echo -e "git\npython\npython-pip\npython-setuptools" >> /tmp/archlive/packages.x86_64
+ - run: find /tmp/archlive
+ - run: cd /tmp/archlive; mkarchiso -v -w work/ -o out/ ./
+ - uses: actions/upload-artifact@v2
+ with:
+ name: Arch Live ISO
+ path: /tmp/archlive/out/*.iso
diff --git a/.github/workflows/lint-python.yaml b/.github/workflows/lint-python.yaml
new file mode 100644
index 00000000..6e6ab071
--- /dev/null
+++ b/.github/workflows/lint-python.yaml
@@ -0,0 +1,40 @@
+on: [ push, pull_request ]
+name: Lint Python and Find Syntax Errors
+jobs:
+ mypy:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python mypy
+ - name: run mypy
+ run: mypy . --ignore-missing-imports || exit 0
+ flake8:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python python-pip
+ - run: python -m pip install --upgrade pip
+ - run: pip install flake8
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors
+ flake8 . --count --select=E9,F63,F7 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ pytest:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux:latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: pacman --noconfirm -Syu python python-pip
+ - run: python -m pip install --upgrade pip
+ - run: pip install pytest
+ # TODO: Add tests and enable pytest checks.
+# - name: Test with pytest
+# run: |
+# pytest
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index 489077b7..65f7d4e8 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -5,7 +5,7 @@ name: Upload archinstall to PyPi
on:
release:
- types: [created, published]
+ types: [ created, published ]
jobs:
deploy:
@@ -13,18 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.x'
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install setuptools wheel flit
- - name: Build and publish
- env:
- FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
- FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- run: |
- flit publish
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.x'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install setuptools wheel flit
+ - name: Build and publish
+ env:
+ FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
+ FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+ run: |
+ flit publish