Skip to content

Add the missing test file #14

Add the missing test file

Add the missing test file #14

Workflow file for this run

name: Test Centralassociation
on:
pull_request:
types: [opened, edited, ready_for_review, synchronize]
# By default pull requests made by Dependabot have a GITHUB_TOKEN with read only permissions
# To be able to send comments `create-or-update-comment` action needs at least a `pull-requests: write` permission
# See https://github.com/peter-evans/create-or-update-comment/issues/103
permissions:
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# This workflow will send a comment in the pull request to allows to download the builded project
# If this workflow already commented in the PR, we search to modify it instead of creating a new one
# If the step find the comment, its identifier will be available as `steps.searchcomment.outputs.comment-id`
- name: Find Github action comment
uses: peter-evans/find-comment@v3
id: searchcomment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
# Create a new comment or modify the existing one
# If `steps.searchcomment.outputs.comment-id` is empty, it will create a new comment
# Else the step will modify the comment
# The created or modified comment id will be available as `steps.sendcomment.outputs.comment-id`
- name: Building comment
uses: peter-evans/create-or-update-comment@v4
id: sendcomment
with:
comment-id: ${{ steps.searchcomment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## :hourglass: Building :hourglass:
edit-mode: replace
- name: Check out the code
uses: actions/checkout@v4
- name: Install poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: 1.7.0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "poetry"
- name: Install dependencies
run: poetry install
- name: Test the project
run: poetry run python ./check_assets.py
- name: Build static files
run: poetry run python ./build.py
- name: Upload static files
uses: actions/upload-artifact@v4
with:
name: Centralassociation
path: dist/
retention-days: 7
# Create a new comment or modify the existing one
- name: Success comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.sendcomment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## :tada: Success :tada:
Download the builded project artifact : https://github.com/aeecleclair/Centralassociation/actions/runs/${{ github.run_id }}
edit-mode: replace
# Create a new comment or modify the existing one
# This action will only be executed if the workflow failed
- name: Failure comment
if: failure()
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.sendcomment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## :x: Error :x:
edit-mode: replace