Skip to content

Commit

Permalink
Setup GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto authored and felixonmars committed Jun 6, 2023
1 parent 0ba0a8d commit 5297a28
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Python application

on:
push:
branches:
- master
pull_request:

env:
INFLUXDB_VERSION: "0.13.0"
SCALA_VERSION: "2.12"
KAFKA_VERSION: "2.6.0"
ETCD_VERSION: "3.4.13"

jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
tags: pifpaf:latest
build-args: |
INFLUXDB_VERSION=${{ env.INFLUXDB_VERSION }}
SCALA_VERSION=${{ env.SCALA_VERSION }}
KAFKA_VERSION=${{ env.KAFKA_VERSION }}
ETCD_VERSION=${{ env.ETCD_VERSION }}
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Run tox
run: docker run --init -t pifpaf:latest

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ deps = .[test,ceph,gnocchi]
http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
python-swiftclient
tooz[redis]
# Older pyOpenSSL causes AttributeError: module ‘lib’ has no attribute X509_V_FLAG_CB_ISSUER_CHECK’`
# See also: https://github.com/pyca/pyopenssl/issues/1143
pyOpenSSL >= 22.0.0
passenv = TMPDIR_FOR_XATTR
allowlist_externals = env
commands =
Expand Down

0 comments on commit 5297a28

Please sign in to comment.