Skip to content

Commit 2497b8d

Browse files
Fix run-all-tests.yml action, cache packages (#43)
* feat: random change (#40) * feat: random change * fix(run-all-tests,docker-compose): specify healthcheck compose services and extra swift test arguments Added healthcheck conditions for httpd and selenium service in `docker-compose.yml` * feat(run-all-tests.yml): added caching steps * chore: update submodules * fix(Package.swift): random change * fixup! feat: random change (#40) * feat(docker-compose,infra): moved dockerfiles to separate folder, created httpd compose file to install curl, healthcheck works for httpd now * fix: try something unique * fix: cache save 0 * feat: ci build for actions instead * fix: remove extra args * fix: cache logic * fix: remove main.yml * fix: ref * fix: remove args? * try other cache * try fix: add debugging stuff * add spet * fix: try more * fix; try something * fix: use v3 * fix: fixes * fix: remomoveve somethiing * maybe .build path? * test-all-tests-action * Revert "test-all-tests-action" This reverts commit 6239a57. * fix(run-all-tests.yml): delete ci docker-compose, specify startup services for swifttesting step --------- Co-authored-by: AdonisCodes <business@simonferns.com>
1 parent 5a02364 commit 2497b8d

6 files changed

Lines changed: 17 additions & 42 deletions

File tree

.github/workflows/main.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/run-all-tests.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,21 @@ jobs:
1313

1414
- uses: swift-actions/setup-swift@v2
1515
with:
16-
swift-version: "6.1"
16+
swift-version: "6.1"
1717

1818
- name: Restore Build Cache
19-
id: cache-build-restore
20-
uses: actions/cache/restore@v4
19+
id: cache-build
20+
uses: actions/cache@v3
2121
with:
22-
key: tests-build-cache-${{ hashFiles('Package.resolved') }}
23-
path: .build
22+
key: tests-build-cache-${{ hashFiles('Package.resolved') }}-${{ github.ref_name }}
23+
path: ./.build
2424

2525
- name: Run All Tests
2626
uses: GetAutomaApp/opensource-actions/swifttesting@main
2727
with:
2828
compose: "true"
29-
docker_compose_extra_args: "--scale swift_web_driver=0 --scale build=0 --scale test=0 --scale shell=0"
30-
required_healthy_services_docker_compose: '["httpd", "selenium"]'
31-
swift_test_extra_args: "-Xswiftc -warnings-as-errors"
32-
33-
- name: Save Build Cache
34-
id: cache-build-save
35-
uses: actions/cache/save@v4
36-
with:
37-
path: .build
38-
key: ${{ steps.cache-build-restore.outputs.cache-primary-key }}
29+
required_healthy_services_docker_compose: '["selenium", "httpd"]'
30+
compose_services_to_startup: '["selenium", "httpd"]'
3931

4032
env:
4133
PATH: "/usr/local/bin:/usr/bin:/bin"

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import PackageDescription
44

5-
/// A description
5+
/// A
66
public let package = Package(
77
name: "swift-webdriver",
88
platforms: [

docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
services:
22
httpd:
3-
image: httpd
43
network_mode: host
4+
build:
5+
context: .
6+
dockerfile: ./infra/HTTPDDockerfile
57
volumes:
68
- ./TestAssets:/usr/local/apache2/htdocs/
79
ports:
@@ -28,7 +30,9 @@ services:
2830

2931
swift_web_driver:
3032
&SwiftWebDriver
31-
build: .
33+
build:
34+
context: .
35+
dockerfile: ./infra/Dockerfile
3236
volumes:
3337
- .:/SwiftWebDriver
3438
working_dir: /SwiftWebDriver
File renamed without changes.

infra/HTTPDDockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM httpd
2+
RUN apt-get update && apt-get install -y curl
3+

0 commit comments

Comments
 (0)