Skip to content

Commit

Permalink
fix: move from circleci to gha (#4248)
Browse files Browse the repository at this point in the history
* fix: move from circleci to gha

* fix: move from circleci to gha

* fix: move from circleci to gha

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose

* fix: docker compose
  • Loading branch information
kobenguyent authored Mar 16, 2024
1 parent 1293e6c commit 6175f8f
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 147 deletions.
5 changes: 0 additions & 5 deletions .circleci/build.sh

This file was deleted.

48 changes: 0 additions & 48 deletions .circleci/config.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .circleci/test.sh

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Acceptance Tests using docker compose

on:
push:
branches:
- '3.x'
pull_request:
branches:
- '**'

env:
CI: true
# Force terminal colors. @see https://www.npmjs.com/package/colors
FORCE_COLOR: 1

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3

# Run acceptance tests using docker-compose
- name: Run Puppeteer Acceptance Tests
run: docker-compose run --rm test-acceptance.puppeteer
working-directory: test

# Run rest tests using docker-compose
- name: Run REST Tests
run: docker-compose run --rm test-rest
working-directory: test

# Run WebDriverIO acceptance tests using docker-compose
- name: Run WebDriverIO Acceptance Tests
run: docker-compose run --rm test-acceptance.webdriverio
working-directory: test

# Run faker BDD tests using docker-compose
- name: Run Faker BDD Tests
run: docker-compose run --rm test-bdd.faker
working-directory: test
2 changes: 0 additions & 2 deletions test/acceptance/coverage_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { I } = inject();

Feature('Plugins');

Feature('TODO mvc demo');

Before(() => {
I.amOnPage('https://todomvc.com/examples/react/dist/');

Expand Down
92 changes: 10 additions & 82 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,17 @@
version: '3'
services:
test-unit:
build: ..
entrypoint: /codecept/node_modules/.bin/mocha
command: test/unit
working_dir: /codecept
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-runner:
image: node:12.13-slim
entrypoint: /codecept/node_modules/.bin/mocha
command: test/runner
working_dir: /codecept
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-helpers:
build: ..
entrypoint: /codecept/node_modules/.bin/mocha --invert --fgrep Appium
command: test/helper
working_dir: /codecept
env_file: .env
depends_on:
- selenium.chrome
- php
- json_server
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-rest:
build: ..
entrypoint: /codecept/node_modules/.bin/mocha
<<: &test-service
build: ..
entrypoint: /codecept/node_modules/.bin/mocha
working_dir: /codecept
env_file: .env
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules
command: test/rest
working_dir: /codecept
env_file: .env
depends_on:
- json_server
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-graphql:
build: ..
entrypoint: /codecept/node_modules/.bin/mocha
command: test/graphql
working_dir: /codecept
env_file: .env
depends_on:
- json_server-graphql
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

test-acceptance.webdriverio:
build: ..
Expand Down Expand Up @@ -84,20 +41,6 @@ services:
- ./support:/support
- node_modules:/node_modules

test-acceptance.testcafe:
build: ..
env_file: .env
environment:
# TODO Add a testcafe tag
- CODECEPT_ARGS=-c codecept.Testcafe.js --grep @Puppeteer
depends_on:
- php
volumes:
- ./acceptance:/tests
- ./data:/data
- ./support:/support
- node_modules:/node_modules

test-bdd.faker:
build: ..
env_file: .env
Expand All @@ -124,29 +67,14 @@ services:
- .:/test

json_server:
build: ..
<<: *test-service
entrypoint: []
command: npm run json-server
working_dir: /codecept
expose:
- 8010
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

json_server-graphql:
build: ..
entrypoint: []
command: npm run json-server:graphql
working_dir: /codecept
expose:
- 8020
volumes:
- ..:/codecept
- node_modules:/codecept/node_modules

puppeteer-image:
image: ghcr.io/puppeteer/puppeteer:21.1.1
image: ghcr.io/puppeteer/puppeteer:22.4.1

volumes:
node_modules:

0 comments on commit 6175f8f

Please sign in to comment.