diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 04e1463..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Docker Image CI - -on: - pull_request: - branches: - - "develop" - - "master" - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: KengoTODA/actions-setup-docker-compose@v1 - with: - version: "2.14.2" - - - name: Build And Run Docker image - run: | - docker-compose build --no-cache - docker-compose up selenium -d - docker-compose run test diff --git a/.github/workflows/run-all-tests.yml b/.github/workflows/run-all-tests.yml index 58ee888..1822eaf 100644 --- a/.github/workflows/run-all-tests.yml +++ b/.github/workflows/run-all-tests.yml @@ -13,29 +13,21 @@ jobs: - uses: swift-actions/setup-swift@v2 with: - swift-version: "6.1" + swift-version: "6.1" - name: Restore Build Cache - id: cache-build-restore - uses: actions/cache/restore@v4 + id: cache-build + uses: actions/cache@v3 with: - key: tests-build-cache-${{ hashFiles('Package.resolved') }} - path: .build + key: tests-build-cache-${{ hashFiles('Package.resolved') }}-${{ github.ref_name }} + path: ./.build - name: Run All Tests uses: GetAutomaApp/opensource-actions/swifttesting@main with: compose: "true" - docker_compose_extra_args: "--scale swift_web_driver=0 --scale build=0 --scale test=0 --scale shell=0" - required_healthy_services_docker_compose: '["httpd", "selenium"]' - swift_test_extra_args: "-Xswiftc -warnings-as-errors" - - - name: Save Build Cache - id: cache-build-save - uses: actions/cache/save@v4 - with: - path: .build - key: ${{ steps.cache-build-restore.outputs.cache-primary-key }} + required_healthy_services_docker_compose: '["selenium", "httpd"]' + compose_services_to_startup: '["selenium", "httpd"]' env: PATH: "/usr/local/bin:/usr/bin:/bin" diff --git a/Package.swift b/Package.swift index c883999..69b6124 100644 --- a/Package.swift +++ b/Package.swift @@ -2,7 +2,7 @@ import PackageDescription -/// A description +/// A public let package = Package( name: "swift-webdriver", platforms: [ diff --git a/docker-compose.yml b/docker-compose.yml index 6aabeb8..d013105 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,9 @@ services: httpd: - image: httpd network_mode: host + build: + context: . + dockerfile: ./infra/HTTPDDockerfile volumes: - ./TestAssets:/usr/local/apache2/htdocs/ ports: @@ -28,7 +30,9 @@ services: swift_web_driver: &SwiftWebDriver - build: . + build: + context: . + dockerfile: ./infra/Dockerfile volumes: - .:/SwiftWebDriver working_dir: /SwiftWebDriver diff --git a/Dockerfile b/infra/Dockerfile similarity index 100% rename from Dockerfile rename to infra/Dockerfile diff --git a/infra/HTTPDDockerfile b/infra/HTTPDDockerfile new file mode 100644 index 0000000..54a1c1b --- /dev/null +++ b/infra/HTTPDDockerfile @@ -0,0 +1,3 @@ +FROM httpd +RUN apt-get update && apt-get install -y curl +