summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-26 11:55:25 +0300
committerПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-26 11:55:25 +0300
commit0dea86a8970a950e7c363c232817580ad5a0921d (patch)
treec6a2c464f5c1fdfc846bef30f7782b30ec308d6b /.github
parentff3be4a24d4fdb64cd4ec0836e9917c75f964dae (diff)
Add CI/CD pipelines
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/docker-build-on-tag.yml27
-rw-r--r--.github/workflows/pytest-on-push.yml27
2 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/docker-build-on-tag.yml b/.github/workflows/docker-build-on-tag.yml
new file mode 100644
index 0000000..4dfad32
--- /dev/null
+++ b/.github/workflows/docker-build-on-tag.yml
@@ -0,0 +1,27 @@
+name: Docker Build and Push
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
+ - name: Build and push Docker images
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ platforms: linux/arm64,linux/amd64
+ push: true
+ tags: us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref }}
+ build-args: |
+ BUILDKIT_INLINE_CACHE=1
diff --git a/.github/workflows/pytest-on-push.yml b/.github/workflows/pytest-on-push.yml
new file mode 100644
index 0000000..f14bbd2
--- /dev/null
+++ b/.github/workflows/pytest-on-push.yml
@@ -0,0 +1,27 @@
+name: Pytest
+
+on: [push]
+
+jobs:
+ build:
+
+ 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 -r requirements.txt
+ pip install -e .
+ pip install pytest
+
+ - name: Test with pytest
+ run: |
+ pytest