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

Externalizing dev doc publishing and avoiding re-run CI on merging. #1698

Merged
merged 7 commits into from
Dec 15, 2022

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Dec 15, 2022

I think rerun the CI workflow on merge (push-branches-main) is a waste of time and resources. So I'm am stopping that.
This requires to externalize the dev-docs publishing because there are done on merging.

Also I now run all the unit tests from the very beginning, and I fixed some typo regarding cache.

Feedback is appreciated @akaszynski @RobPasMue

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc Maintenance General maintenance of the repo (libraries, cicd, etc) Enhancement Improve any current implemented feature New Feature Request or proposal for a new feature labels Dec 15, 2022
@github-actions
Copy link
Contributor

Please add one of the following labels to add this contribution to the Release Notes 👇

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #1698 (420ebf5) into main (5e57a31) will decrease coverage by 4.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1698      +/-   ##
==========================================
- Coverage   85.26%   81.17%   -4.10%     
==========================================
  Files          45       45              
  Lines        7506     7506              
==========================================
- Hits         6400     6093     -307     
- Misses       1106     1413     +307     

@germa89 germa89 merged commit 1e28b80 into main Dec 15, 2022
@germa89 germa89 deleted the feat/small-fixes branch December 15, 2022 19:27
@germa89
Copy link
Collaborator Author

germa89 commented Dec 15, 2022

It doesn't work...

image

Possible solution:
https://github.com/dawidd6/action-download-artifact

@germa89
Copy link
Collaborator Author

germa89 commented Dec 15, 2022

Also, interestingly now the check is related to the ci run on the push (that makes sense).

image

Comment on lines 405 to 406
runs-on: ubuntu-latest
needs: [smoke-tests]
timeout-minutes: 35
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand you do this because you just want all of the different stages to run at the same time... but it is tipically a good practice to make dependent stages. That will reduce runner times consumption (even if your repo is public, do it for environmental reasons 😄 )

If the smoke tests fail.. the build tests are obviously going to fail. Just give it a thought do I understand your change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point, but waiting 3-4 minutes to start the "real" testing is annoying. If we care about runner consumption, I would break the smoke test matrix in 4+4 or 2+2+2+2 .. but it seems not gain enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, yeah, I get it. No problem. It was just a suggestion 😄

Comment on lines +1 to +24
name: Dev docs publisher

on:
workflow_dispatch:
push:
tags:
- "*"
branches:
- main

env:
DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com'

jobs:
upload_dev_docs:
name: "Upload dev documentation"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Deploy the latest documentation
uses: pyansys/actions/doc-deploy-dev@v2
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action does not work as you expect... you need to have a "documentation-html" artifact for this to work. This means that you need to build the docs in the same workflow.

If you have doubts let me know.

As it is, this workflow will try to upload a non-existing artifact =)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is why I did later #1701

now I wonder what is better, if rebuild the docs or just reuse the artifacts from the other workflow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha yeah... Didn't see that.

Your choice I guess. Reusing artifacts from other workflows is "weird" for me - but acceptable if that's what you want 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm see if I can... and then decide xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related with CICD, Github Actions, etc Enhancement Improve any current implemented feature Maintenance General maintenance of the repo (libraries, cicd, etc) New Feature Request or proposal for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants