mirror of
https://github.com/ViViDboarder/docker-restic-cron.git
synced 2024-11-23 05:36:38 +00:00
Add tests
This commit is contained in:
parent
04825619ae
commit
fd824fbf47
30
.github/workflows/tests.yml
vendored
Normal file
30
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: tests
|
||||||
|
|
||||||
|
"on":
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run base tests
|
||||||
|
run: make test-x86
|
||||||
|
|
||||||
|
- name: Run s3 tests
|
||||||
|
run: make test-s3-x86
|
||||||
|
|
||||||
|
- name: Setup python
|
||||||
|
uses: actions/setup-python@v2.2.2
|
||||||
|
|
||||||
|
- name: Run pre-commit hooks
|
||||||
|
run: |
|
||||||
|
pip install pre-commit
|
||||||
|
make check
|
4
Makefile
4
Makefile
@ -11,7 +11,7 @@ test: test-x86
|
|||||||
|
|
||||||
.PHONY: build-x86
|
.PHONY: build-x86
|
||||||
build-x86:
|
build-x86:
|
||||||
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
|
docker build --build-arg TARGETARCH=amd64 -f ./Dockerfile -t $(DOCKER_TAG) .
|
||||||
|
|
||||||
.PHONY: build-arm
|
.PHONY: build-arm
|
||||||
build-arm:
|
build-arm:
|
||||||
@ -35,7 +35,7 @@ test-all: test-x86 test-arm
|
|||||||
|
|
||||||
.PHONY: test-s3-x86
|
.PHONY: test-s3-x86
|
||||||
test-s3-x86:
|
test-s3-x86:
|
||||||
cd tests && ./test-s3.sh
|
cd tests && env TARGETARCH=amd64 ./test-s3.sh
|
||||||
|
|
||||||
.PHONY: shell-x86
|
.PHONY: shell-x86
|
||||||
shell-x86: build-x86
|
shell-x86: build-x86
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
restic:
|
restic:
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- TARGETARCH
|
||||||
entrypoint: "bash"
|
entrypoint: "bash"
|
||||||
command: "-c 'sleep 2 && /test.sh'"
|
command: "-c 'sleep 2 && /test.sh'"
|
||||||
hostname: itest
|
hostname: itest
|
||||||
|
Loading…
Reference in New Issue
Block a user