Skip to content

Commit 76d34c3

Browse files
committed
ci: update testing workflow
1 parent 1dd8255 commit 76d34c3

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,51 @@ on: # yamllint disable-line rule:truthy
44
push:
55
branches:
66
- 'master'
7-
tags:
8-
- 'v*.*.*'
97
pull_request:
108
branches:
119
- 'master'
12-
release:
13-
types:
14-
- 'created'
15-
schedule:
16-
# Every Sunday at 05:10
17-
- cron: '10 5 * * 0'
1810

1911
name: 🔍 Continuous integration
2012

2113
jobs:
2214
build:
23-
runs-on: ${{ matrix.os }}
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
os:
28-
- ubuntu-latest
15+
timeout-minutes: 4
16+
runs-on: ubuntu-latest
2917
steps:
30-
- name: 📦 Install goss
31-
uses: e1himself/goss-installation-action@v1.2.1
32-
3318
- name: 📦 Check out the codebase
3419
uses: actions/checkout@v4.1.6
3520

36-
### For Cross Platform OSX builds uncomment these lines
37-
- name: 🖥️ Set up QEMU
38-
uses: docker/setup-qemu-action@v3
39-
with:
40-
platforms: arm64
41-
42-
- name: 🚀 Set up Docker BuildX
43-
uses: docker/setup-buildx-action@v3
44-
with:
45-
install: true
21+
- name: Add dns to /etc/resolv.conf
22+
run: |
23+
echo "Adding dns to /etc/resolv.conf..."
24+
echo "nameserver 127.0.0.1" | sudo tee -a /etc/resolv.conf
25+
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
26+
27+
- name: 🔍 Check if TCP/UDP port 53 is in use (netstat)
28+
run: |
29+
echo "Checking if TCP/UDP port 53 is in use using netstat..."
30+
netstat -tuln | grep ':53 ' || echo "Port 53 is not in use"
31+
32+
- name: 📋 List all services using port 53 (ss)
33+
run: |
34+
echo "Listing all services using port 53 using ss..."
35+
ss -tuln | grep ':53 ' || echo "No services using port 53"
36+
37+
- name: ❌ Attempt to stop any service using TCP/UDP port 53
38+
run: |
39+
echo "Stopping services using port 53..."
40+
fuser -k 53/tcp || echo "No TCP service to stop on port 53"
41+
fuser -k 53/udp || echo "No UDP service to stop on port 53"
42+
43+
- name: 🔍 Verify if TCP/UDP port 53 is free (ss)
44+
run: |
45+
echo "Verifying if port 53 is free using ss..."
46+
ss -tuln | grep ':53 ' || echo "Port 53 is now free"
4647
4748
- name: 🌎 Generate .env file
4849
run: make env
4950

50-
- name: 🐳 Start Docker Compose services
51+
- name: 🏗️ Start docker-compose services
5152
run: make up
5253

5354
...

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,15 @@ PHONY: all
110110
env: ## Generate .env file from example, use `make env force=true`, to force re-create file
111111
ifeq ($(FORCE),true)
112112
@echo "${YELLOW}Force re-creating .env file from example...${RST}"
113-
$(ENVSUBST) $(EXPORT_VARS) < ./.env.example > ./.env
113+
@# $(ENVSUBST) $(EXPORT_VARS) < ./.env.example > ./.env
114+
cp ./.env.example ./.env
114115
else ifneq ("$(wildcard ./.env)","")
115116
@echo ""
116117
@echo "${YELLOW}The .env file already exists! Use FORCE=true to re-create.${RST}"
117118
else
118119
@echo "Creating .env file from example"
119-
$(ENVSUBST) $(EXPORT_VARS) < ./.env.example > ./.env
120+
@# $(ENVSUBST) $(EXPORT_VARS) < ./.env.example > ./.env
121+
cp ./.env.example ./.env
120122
endif
121123
.PHONY: env
122124

0 commit comments

Comments
 (0)