check_project #3164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ecosystem | Project tests workflow | |
on: | |
# Payload: | |
# "client_payload": { | |
# "tier": "Community", # 'Tier of project' | |
# "branch_name": "weekly-checks-1", # 'Branch name to push changes' | |
# "repo_name": "demo-implementation", # 'Repository name' | |
# "repo_url": "https://github.com/IceKhan13/demo-implementation" # 'Repository URL', | |
# } | |
repository_dispatch: | |
types: [ check_project ] | |
jobs: | |
project_check_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Running for ${{ github.event.client_payload.repo_name }} | |
id: info | |
run: | | |
echo "Running check for ${{ github.event.client_payload.repo_url }}..." | |
echo "Will push changes to ${{ github.event.client_payload.branch_name }}..." | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.client_payload.branch_name }} | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Tests Stable | |
id: test_stb | |
uses: ./.github/actions/run-tests | |
with: | |
repo_url: ${{ github.event.client_payload.repo_url }} | |
test_type: "stable" | |
tox_env: "py39" | |
tier: ${{ github.event.client_payload.tier }} | |
run_name: ${{ github.event.client_payload.branch_name }} | |
logs_link: https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }} | |
- name: Tests dev | |
id: test_dev | |
uses: ./.github/actions/run-tests | |
with: | |
repo_url: ${{ github.event.client_payload.repo_url }} | |
test_type: "development" | |
tox_env: "py39" | |
tier: ${{ github.event.client_payload.tier }} | |
run_name: ${{ github.event.client_payload.branch_name }} | |
logs_link: https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }} | |
- name: Tests standard | |
id: test_std | |
uses: ./.github/actions/run-tests | |
with: | |
repo_url: ${{ github.event.client_payload.repo_url }} | |
test_type: "standard" | |
tox_env: "py39" | |
tier: ${{ github.event.client_payload.tier }} | |
run_name: ${{ github.event.client_payload.branch_name }} | |
logs_link: https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }} | |
- name: Merge files and save to db | |
run: python manager.py process_temp_test_results_files --folder_name=${{ github.event.client_payload.branch_name }} | |
- name: Commit changes | |
run: | | |
git pull --rebase --autostash | |
git add ecosystem/resources/ | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Tests for ${{ github.event.client_payload.repo_url }}" --allow-empty | |
git pull --rebase --autostash | |
git push |