diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 00000000..00cf7565 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,36 @@ +name: PHP CI + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: calendar, soap + tools: composer + + - name: Install dependencies + run: | + apt-get update && apt-get install -y unzip libxml2-dev + composer install + env: + COMPOSER_CACHE_DIR: ${{ github.workspace }}/.composer/cache + + - name: Run tests + run: | + src/modules/mo/mo_dhl/vendor/bin/phpunit -c tests/phpunit.xml tests diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml deleted file mode 100644 index efc8bf51..00000000 --- a/bitbucket-pipelines.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This is a sample build configuration for PHP. -# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples. -# Only use spaces to indent your .yml configuration. -# ----- -# You can specify a custom docker image from Docker Hub as your build environment. -image: php:7.4.33-cli - -pipelines: - branches: - master: - - step: - caches: - - composer - script: - - docker-php-ext-install calendar - - apt-get update && apt-get install -y unzip libxml2-dev - - docker-php-ext-install soap - - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - - composer install - - src/modules/mo/mo_dhl/vendor/bin/phpunit -c tests/phpunit.xml tests - - apt-get update && apt-get install -y unzip git - - git push https://$USERNAME:$PASSWORD@github.com/mediaopt/dhl-oxid-hub.git - - git push https://$USERNAME:$PASSWORD@github.com/mediaopt/dhl-oxid-hub.git --tags - - develop: - - step: - caches: - - composer - script: - - docker-php-ext-install calendar - - apt-get update && apt-get install -y unzip libxml2-dev - - docker-php-ext-install soap - - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - - composer install - - src/modules/mo/mo_dhl/vendor/bin/phpunit -c tests/phpunit.xml tests - pull-requests: - '**': - - step: - caches: - - composer - script: - - docker-php-ext-install calendar - - apt-get update && apt-get install -y unzip libxml2-dev - - docker-php-ext-install soap - - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - - composer install - - src/modules/mo/mo_dhl/vendor/bin/phpunit -c tests/phpunit.xml tests