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

more strict php requirement #314

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from
Open

Conversation

dbrekelmans
Copy link
Collaborator

No description provided.

@dbrekelmans
Copy link
Collaborator Author

Hi @fox91, following your PR with submodules (#292), I'm targeting the 1.x branch, but for some reason the github actions are detecting changes in the generated files. I'm not sure how this is possible, do you perhaps have any idea?

@Kharhamel
Copy link
Collaborator

Kharhamel commented Jan 4, 2022

I think maybe the better idea would be to commit the documentation files that you want to use, otherwise a new personn won't be able to work on the branch 1.x since they won't have the same doc than you and won't generate the same files.

Since the github project of the php doc doesn't use tag, you cannot load the specific version that you want, so you need to commit everything.

The cleaner way would be to commit you doc files in separates project and then just update the script update.sh to pull from theses projects

@dbrekelmans
Copy link
Collaborator Author

@Kharhamel PR #292 introduced git submodules for the doc files, pinned to a certain commit hash. So in theory, everyone should get the exact same docs (that specific commit hash)

@fox91
Copy link

fox91 commented Jan 5, 2022

Hi @fox91, following your PR with submodules (#292), I'm targeting the 1.x branch, but for some reason the github actions are detecting changes in the generated files. I'm not sure how this is possible, do you perhaps have any idea?

Hi @dbrekelmans, I've tested branch 1.x with PHP 7.4 and I don't get difference in generated files.
This is the output of PHPunit on my env (the same that is failing in CI):

PHPUnit 8.5.2 by Sebastian Bergmann and contributors.

Error:         No code coverage driver is available

...................................Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/pcre/functions/preg-match.xml
.Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/pcre/functions/preg-match.xml
.Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/pcre/functions/preg-match.xml
.Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/mbstring/functions/mb-ereg-replace-callback.xml
Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/gmp/functions/gmp-export.xml
Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/hash/functions/hash-update.xml
Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/imap/functions/imap-open.xml
.Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/apache/functions/apache-getenv.xml
.Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/array/functions/array-replace.xml
Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/shmop/functions/shmop-delete.xml
Loading /home/me/dev/safe/generator/tests/../doc/doc-en/en/reference/sqlsrv/functions/sqlsrv-next-result.xml
..................        58 / 58 (100%)

Time: 650 ms, Memory: 78.00 MB

OK (58 tests, 155 assertions)

I'm trying, but locally I don't know how to reproduce the error.

It seems that the step "Check out submodules" was skipped (maybe already cached?) but then the test can't some file:

file_get_contents(/home/runner/work/safe/safe/generator/tests/../doc/doc-en/en/reference/session/functions/session-register.xml):
  failed to open stream: No such file or directory

Maybe the action don't manage correctly the submodules cache?
Can you try disabling cache for same tests?


Hi @Kharhamel, as said by @dbrekelmans git submodules are pinned to a certain commit hash, so everyone (including CI) can use exactly the same version.

@fox91
Copy link

fox91 commented Jan 5, 2022

@dbrekelmans try using this step on actions:

- name: Checkout repository and submodules
  uses: actions/checkout@v2
  with:
    submodules: recursive

Instead of steps "Checkout" and "Check out submodules"

or replace your git submodule init with git submodule update --init --recursive.

@Kharhamel
Copy link
Collaborator

Kharhamel commented Jan 5, 2022

The CI workflow use a cache (https://github.com/actions/cache) for the documentation file which may be reused between master and 1.x. It would probably be easier to just remove the caching step on 1.x

@fox91
Copy link

fox91 commented Jan 21, 2022

Hi @Kharhamel, any news about the solutions that I've suggested here?

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

Successfully merging this pull request may close these issues.

None yet

3 participants