From 25cc4f6548242c3a5e44b4555a1548ccf7622c86 Mon Sep 17 00:00:00 2001 From: Akanksha Singh Date: Thu, 1 Jun 2023 16:24:00 +0530 Subject: [PATCH] Initial commits --- .github/workflows/lint.yml | 15 ++++++++++ .github/workflows/phpunit.yml | 54 +++++++++++++++++++++++++++++++++++ .github/workflows/semver.yml | 17 +++++++++++ LICENSE => LICENSE.txt | 0 4 files changed, 86 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/phpunit.yml create mode 100644 .github/workflows/semver.yml rename LICENSE => LICENSE.txt (100%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e5d49bb --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +--- +name: Code Linting +on: + pull_request: + push: + branches: + - main +jobs: + Lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Run CodeSniffer + uses: discoverygarden/CodeSniffer@v1 diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..6791410 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,54 @@ +name: PHPUnit Tests +on: + workflow_call: + inputs: + composer_prereqs: + required: false + type: string + composer_patches: + required: false + type: string + +jobs: + PHPUnit: + runs-on: ubuntu-latest + strategy: + matrix: + drupal-version: ['9.4'] + php-version: ['7.4', '8.0'] + experimental: [false] + include: + - drupal-version: '9' + php-version: '7.4' + experimental: true + - drupal-version: '9' + php-version: '8.1' + experimental: true + - drupal-version: '9.4' + php-version: '8.1' + experimental: true + continue-on-error: ${{ matrix.experimental }} + container: + image: drupal:${{ matrix.drupal-version }}-php${{ matrix.php-version }} + ports: + - 80 + services: + postgres: + image: postgres + env: + POSTGRES_DB: drupal + POSTGRES_USER: drupal + POSTGRES_PASSWORD: drupal + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - name: Run PHPUnit Action + uses: discoverygarden/phpunit-action@v1 + with: + composer_package_prerequisites: ${{ inputs.composer_prereqs }} + composer_patches: ${{ inputs.composer_patches }} + composer-auth: ${{ secrets.PRIVATE_PACKAGIST_AUTH_ACCESS }} diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml new file mode 100644 index 0000000..76556dc --- /dev/null +++ b/.github/workflows/semver.yml @@ -0,0 +1,17 @@ +name: Auto Semver +on: + pull_request_target: + types: closed + branches: + - main +jobs: + Updating-Tag: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Run Auto Semver + uses: discoverygarden/auto-semver@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt