Skip to content

Merge pull request #161 from kotopesutility/master #5

Merge pull request #161 from kotopesutility/master

Merge pull request #161 from kotopesutility/master #5

Workflow file for this run

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