mirror of
https://github.com/ViViDboarder/docker-restic-cron.git
synced 2024-12-21 11:07:44 +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
|
||||
build-x86:
|
||||
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
|
||||
docker build --build-arg TARGETARCH=amd64 -f ./Dockerfile -t $(DOCKER_TAG) .
|
||||
|
||||
.PHONY: build-arm
|
||||
build-arm:
|
||||
@ -35,7 +35,7 @@ test-all: test-x86 test-arm
|
||||
|
||||
.PHONY: test-s3-x86
|
||||
test-s3-x86:
|
||||
cd tests && ./test-s3.sh
|
||||
cd tests && env TARGETARCH=amd64 ./test-s3.sh
|
||||
|
||||
.PHONY: shell-x86
|
||||
shell-x86: build-x86
|
||||
|
@ -1,9 +1,12 @@
|
||||
---
|
||||
version: '2'
|
||||
services:
|
||||
restic:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- TARGETARCH
|
||||
entrypoint: "bash"
|
||||
command: "-c 'sleep 2 && /test.sh'"
|
||||
hostname: itest
|
||||
|
Loading…
Reference in New Issue
Block a user