hasadna / open-bus-map-search

open-bus-map-search
https://open-bus-map-search.hasadna.org.il/dashboard
MIT License
48 stars 85 forks source link

ci: added test results to ci preview #824

Open arielrahamim opened 1 week ago

arielrahamim commented 1 week ago

Description

added test results to ci preview

screenshots

340886845-75fc6b2b-1cf5-48a4-b7f6-acd763e9c043

based on issue https://github.com/hasadna/open-bus-map-search/issues/814

github-actions[bot] commented 1 week ago

Preview: https://s3.amazonaws.com/noam-gaash.co.il/9577935262/open-bus/13/index.html Preview Storybook: https://s3.amazonaws.com/noam-gaash.co.il/9577935262/open-bus/13/storybook/index.html

NoamGaash commented 1 week ago

Hi, thanks for contributong to open-bus! Looking at the following link: https://s3.amazonaws.com/noam-gaash.co.il/9577935262/open-bus/da0da08be1582935d9956f15e9bdeb12d060deff/test-results/index.html I believe that the test report isn't uploaded

arielrahamim commented 1 week ago

doesn't validate.yaml generate and upload the test result? as i'm not familiar with your ci, i just copied the description of "Set test results" step in that workflow : 'Test results: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/test-results/index.html' i think my mistake is using the peter-evans/find-comment@v1 module to look for a comment with test results but the validate workflow doesn't make a comment. i'll look into how to make the preview workflow get the URL

NoamGaash commented 1 week ago

Regarding the comment - I don't think we should add another comment. the same comment can be used for all links needed. Regarding the test report deployment - you're right, mi mistake. I see that validate.yaml does upload the report, but fails: https://github.com/hasadna/open-bus-map-search/actions/runs/9577935256/job/26407333905

/home/runner/work/_actions/shallwefootball/s3-upload-action/master/dist/index.js:212
        throw new Error(`Input required and not supplied: ${name}`);
        ^

Error: Input required and not supplied: aws_key_id
arielrahamim commented 1 week ago

i didn't change the validate.yaml workflow, seems to be an issue supplying the aws_key_id secret

NoamGaash commented 1 week ago

@arielrahamim Sure, it's not because of you. AFAIK, maybe it never worked. Yet I think we should fix it before adding a link

arielrahamim commented 5 days ago

can u give me some background to what validate.yaml does? especially the "publish-test-results" there might be an issue with the AWS_KEY_ID env variable

NoamGaash commented 4 days ago

Well, it seems to work after all - https://s3.amazonaws.com/noam-gaash.co.il/9624572553/open-bus/fa21f203ff20a3c3561a292621686b41b476abd3/test-results/index.html This workflow uploads the tests results to this S3 storage. however, please note the deploy-preview.yml workflow will not have the same run_id and commit sha as the validate job, therefore the link you generate in this PR will be broken