[pre-commit.ci] pre-commit autoupdate #801
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: Build | |
on: | |
repository_dispatch: | |
types: [run_test_suite] | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
ms_suite: omero-ms-zarr-suite | |
bf_suite: ome-zarr-bf2raw-suite | |
zarr_suite: ome-zarr-py-suite | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
channels: conda-forge,ome | |
environment-file: environment.yml | |
python-version: 3.9 | |
- name: Set testing environment | |
if: github.event.action == 'run_test_suite' | |
shell: bash | |
run: | | |
# Set the parameters to be used in the response | |
repo=${{ github.event.client_payload.repo }} | |
owner=${{ github.event.client_payload.owner }} | |
sha=${{ github.event.client_payload.sha }} | |
repo_name=${repo#"$owner"} | |
repo_name=${repo_name#"/"} | |
echo "client_repo_name="$repo_name >> $GITHUB_ENV | |
echo "client_sha="$sha >> $GITHUB_ENV | |
./setup.sh $repo | |
- name: Run pytest | |
shell: bash -l {0} | |
run: pytest -vxk "not omero" | |
# yamllint disable rule:line-length | |
- name: Create issue | |
if: failure() && github.event.action == 'run_test_suite' | |
run: | | |
curl -X "POST" "https://api.github.com/repos/ome/${{env.client_repo_name}}/issues?state=all" \ | |
-H "Cookie: logged_in=no" \ | |
-H "Authorization: token ${{secrets.ACTION_API_TOKEN}}" \ | |
-H "Content-Type: text/plain; charset=utf-8" \ | |
-d $'{ | |
"title": "Test suite failure for commit ${{env.client_sha}}", | |
"body": "Test suite status: ${{ job.status }} see https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}", | |
"labels": [ | |
"bug" | |
] | |
}' |