Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Composer dependency improvements #243

Closed
jaapio opened this issue Jul 7, 2020 · 0 comments · Fixed by #319
Closed

[CI] Composer dependency improvements #243

jaapio opened this issue Jul 7, 2020 · 0 comments · Fixed by #319

Comments

@jaapio
Copy link
Member

jaapio commented Jul 7, 2020

Currently, we are building only with the versions of depencies in our composer.lock file while we accept a wider range version of libs in this package. After some discussion we decided that we should ajust the ci pipeline and extend the unittest matrix to check with multiple versions using something like the snippet below:

      - name: "Cache dependencies installed with composer"
        uses: "actions/cache@v2"
        with:
          path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
          key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
          restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

      - name: "Install lowest dependencies from composer.json"
        if: "matrix.dependencies == 'lowest'"
        run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest"

      - name: "Install locked dependencies from composer.lock"
        if: "matrix.dependencies == 'locked'"
        run: "composer install --no-interaction --no-progress --no-suggest"

      - name: "Install highest dependencies from composer.json"
        if: "matrix.dependencies == 'highest'"
        run: "composer update --no-interaction --no-progress --no-suggest"

We will keep the composer.lock in this repo because it allows us to pin on certain versions for development. Which seems to be usefull for us at the moment.

We need to check if other buildsteps should also use this matrix, but for now we will start with the unittests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant