aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-11-30 00:00:59 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-11-30 00:23:42 +0300
commit793a598abe9e7cda8216d35fc09fe700b5d5adf3 (patch)
treed8d505b75083df401598e798bddf8091b564d04a /.github
parentbye-bye, Travis (diff)
downloadcgitize-793a598abe9e7cda8216d35fc09fe700b5d5adf3.tar.gz
cgitize-793a598abe9e7cda8216d35fc09fe700b5d5adf3.zip
add GitHub workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..3be8735
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,58 @@
+name: Test
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ local:
+ runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ python-version: [3.6, 3.7, 3.8, 3.9]
+ name: 'Test locally / ${{ matrix.python-version }}'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '${{ matrix.python-version }}'
+ - name: Initialize Git
+ run: |
+ git config --global user.name 'John Doe'
+ git config --global user.email 'John.Doe@example.com'
+ - name: Run the tests
+ run: ./.ci/local/test.sh
+
+ docker:
+ runs-on: ubuntu-18.04
+ name: Test in Docker
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Run the tests
+ run: ./.ci/docker/test.sh
+
+ public:
+ needs: [local, docker]
+ runs-on: ubuntu-18.04
+ name: Publish
+ if: github.ref == 'refs/heads/master'
+ steps:
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Login to Docker Hub
+ uses: docker/login-action@v1
+ with:
+ username: '${{ secrets.DOCKERHUB_USERNAME }}'
+ password: '${{ secrets.DOCKERHUB_TOKEN }}'
+ - name: Build and publish
+ uses: docker/build-push-action@v2
+ with:
+ platforms: linux/amd64,linux/armhf
+ push: true
+ tags: '${{ secrets.DOCKERHUB_USERNAME }}/cgit-repos:latest'