Skip to content

Commit

Permalink
feat(tests): Installation
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Feb 4, 2024
1 parent 17e6fa0 commit 8838d4d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM alpine
RUN apk add bash docker git make openssl sudo
WORKDIR /usr/local/src
COPY Makefile .
21 changes: 21 additions & 0 deletions tests/alpine/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: default
default: build run

.PHONY: build
build:
docker build -t phpctl-alpine-test .

.PHONY: run
run:
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock phpctl-alpine-test sh

.PHONY: install
install:
sh <(wget -qO- https://raw.githubusercontent.com/opencodeco/phpctl/main/installer.sh)

.PHONY: test
test:
ls -lha /usr/local/bin
phpctl doctor
php --version
composer --version
5 changes: 5 additions & 0 deletions tests/alpine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This tests the `phpctl` installation in a blank Alpine distribution.

Run `make` then inside the container run `make install`.

To check the installation, run `make test`.

0 comments on commit 8838d4d

Please sign in to comment.