Skip to content

Commit a215c79

Browse files
authored
Merge pull request #31 from ba-st/pharo11
Add Pharo 11 support
2 parents 77732c3 + e7a44b5 commit a215c79

File tree

9 files changed

+38
-40
lines changed

9 files changed

+38
-40
lines changed

.github/workflows/docker-build.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,20 @@ jobs:
1919
fetch-depth: 2
2020
- name: Docker meta
2121
id: docker_meta
22-
uses: crazy-max/ghaction-docker-meta@v1
22+
uses: crazy-max/ghaction-docker-meta@v4
2323
with:
2424
images: ghcr.io/${{ github.repository_owner }}/stargate-consul-example
25-
- name: Set branch name
26-
id: set-branch-name
27-
run: |
28-
if [[ -z "${GITHUB_HEAD_REF##*/}" ]]; then
29-
echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
30-
else
31-
echo "::set-output name=BRANCH_NAME::${GITHUB_HEAD_REF##*/}"
32-
fi
3325
- name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v1
26+
uses: docker/setup-buildx-action@v2
3527
- name: Login to Container Registry
3628
if: github.event_name != 'pull_request'
37-
uses: docker/login-action@v1
29+
uses: docker/login-action@v2
3830
with:
3931
registry: ghcr.io
4032
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
4133
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
4234
- name: Docker build and push
43-
uses: docker/build-push-action@v2
35+
uses: docker/build-push-action@v4
4436
with:
4537
context: ./
4638
file: ./docker/Dockerfile
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Integration Tests
2+
3+
on: [push,pull_request,workflow_dispatch]
4+
5+
jobs:
6+
integration-tests:
7+
runs-on: ubuntu-latest
8+
name: Integration Tests
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 2
13+
- name: Run tests using Docker
14+
run: ./compose-test.sh

.github/workflows/loading-groups.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
11+
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
1212
load-spec: [ deployment, examples, tools, development]
1313
name: ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- uses: hpi-swa/setup-smalltalkCI@v1
1717
with:
1818
smalltalk-image: ${{ matrix.smalltalk }}

.github/workflows/markdown-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jobs:
55
name: runner / markdownlint
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v3
99
- name: markdownlint
10-
uses: reviewdog/action-markdownlint@v0.1
10+
uses: reviewdog/action-markdownlint@v0
1111
with:
1212
github_token: ${{ secrets.GITHUB_TOKEN }}
1313
fail_on_error: true

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
shellcheck:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Run Shellcheck
1111
uses: reviewdog/action-shellcheck@v1
1212
with:

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
10+
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
1111
name: ${{ matrix.smalltalk }}
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v3
15-
with:
16-
fetch-depth: 2
1715
- uses: hpi-swa/setup-smalltalkCI@v1
1816
with:
1917
smalltalk-image: ${{ matrix.smalltalk }}
@@ -22,11 +20,8 @@ jobs:
2220
env:
2321
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2422
timeout-minutes: 15
25-
- name: Run tests using Docker
26-
if: matrix.smalltalk == 'Pharo64-10'
27-
run: ./compose-test.sh
2823
- name: Upload coverage to Codecov
29-
uses: codecov/codecov-action@v1
24+
uses: codecov/codecov-action@v3
3025
with:
31-
name: ${{matrix.os}}-${{matrix.smalltalk}}
26+
name: Unit-Tests-${{matrix.smalltalk}}
3227
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ plugin to interact with the [Consul](https://www.consul.io) HTTP API.
88
[![Unit Tests](https://github.com/ba-st/Stargate-Consul/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Stargate-Consul/actions/workflows/unit-tests.yml)
99
[![Coverage Status](https://codecov.io/github/ba-st/Stargate-Consul/coverage.svg?branch=release-candidate)](https://codecov.io/gh/ba-st/Stargate-Consul/branch/release-candidate)
1010
[![Baseline Groups](https://github.com/ba-st/Stargate-Consul/actions/workflows/loading-groups.yml/badge.svg)](https://github.com/ba-st/Stargate-Consul/actions/workflows/loading-groups.yml)
11+
[![Integration Tests](https://github.com/ba-st/Stargate-Consul/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/ba-st/Stargate-Consul/actions/workflows/integration-tests.yml)
1112
[![Markdown Lint](https://github.com/ba-st/Stargate-Consul/actions/workflows/markdown-lint.yml/badge.svg)](https://github.com/ba-st/Stargate-Consul/actions/workflows/markdown-lint.yml)
1213
[![Shellcheck](https://github.com/ba-st/Stargate-Consul/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/ba-st/Stargate-Consul/actions/workflows/shellcheck.yml)
1314

1415
[![GitHub release](https://img.shields.io/github/release/ba-st/Stargate-Consul.svg)](https://github.com/ba-st/Stargate-Consul/releases/latest)
1516
[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org)
1617
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)
1718
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
19+
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)
1820

1921
Quick links
2022

@@ -32,7 +34,7 @@ API to register and deregister the configured services when the API starts/stops
3234

3335
## Installation
3436

35-
To load the project in a Pharo image follow this [instructions](docs/how-to/how-to-load-in-pharo.md).
37+
To load the project in a Pharo image follow these [instructions](docs/how-to/how-to-load-in-pharo.md).
3638

3739
## Contributing
3840

compose-test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
set -e
44

55
echo "Building API"
6-
docker-compose -f api-tests/docker-compose.yml build api
6+
docker compose -f api-tests/docker-compose.yml build api
77
echo "Starting Consul Agent"
8-
docker-compose -f api-tests/docker-compose.yml up -d consul-agent
8+
docker compose -f api-tests/docker-compose.yml up -d consul-agent
99
sleep 1
1010
echo "Starting API"
11-
docker-compose -f api-tests/docker-compose.yml up -d api
11+
docker compose -f api-tests/docker-compose.yml up -d api
1212
sleep 10
1313
echo "Testing API"
1414
curl --fail http://localhost:8080/echo/hello
@@ -18,7 +18,7 @@ HEALTH_STATUS=$(curl -s http://localhost:8500/v1/health/checks/echo | jq '.[0].S
1818
echo "$HEALTH_STATUS"
1919
if [ "$HEALTH_STATUS" != '"passing"' ]; then
2020
echo "Error: Echo service is unhealthy" >&2
21-
docker-compose -f api-tests/docker-compose.yml down
21+
docker compose -f api-tests/docker-compose.yml down
2222
exit 1
2323
fi
24-
docker-compose -f api-tests/docker-compose.yml down
24+
docker compose -f api-tests/docker-compose.yml down

docker/Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
# Stage 1: Load the project
2-
FROM ghcr.io/ba-st/pharo-loader:v10.0.0 AS loader
2+
FROM ghcr.io/ba-st/pharo-loader:v11.0.0 AS loader
33

4-
COPY ./source ./source
5-
COPY ./.git ./.git
6-
RUN pharo metacello install gitlocal://./source \
4+
COPY --chown=pharo:users ./source ./source
5+
COPY --chown=pharo:users ./.git ./.git
6+
RUN pharo metacello install gitlocal://. \
77
BaselineOfStargateConsul --groups=Examples
88

99
# Stage 2: Copy the resulting Pharo.image
1010
FROM ghcr.io/ba-st/launchpad:v4
1111

1212
USER root
1313

14-
RUN apt-get update \
15-
&& apt-get --assume-yes --no-install-recommends install curl \
16-
&& apt-get clean \
17-
&& rm --recursive --force /var/lib/apt/lists/* /tmp/* /var/tmp/*
18-
1914
COPY --from=loader /opt/pharo/pharo-local/iceberg/ba-st/Stargate/docker/health-check.sh ./
2015
COPY --from=loader /opt/pharo/Pharo.image ./
2116
COPY --from=loader /opt/pharo/Pharo.changes ./

0 commit comments

Comments
 (0)