Skip to content

Fix workflow triggers for Forked-Repo-PRs #71

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

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build source and wheel packages

on: push
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
Expand All @@ -16,6 +22,14 @@ jobs:
if: startsWith(matrix.os, 'ubuntu-')
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-build-wheels-${{ hashFiles('setup.cfg', 'setup.py') }}
restore-keys: |
${{ runner.os }}-build-wheels-

- name: Install required system packages for macOS
if: startsWith(matrix.os, 'macos-')
run: |
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test code quality

on: push
on:
push:
pull_request:
branches:
- main

jobs:
code-quality:
Expand All @@ -12,6 +16,14 @@ jobs:
- name: Workaround github issue https://github.com/actions/runner-images/issues/7192
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-code-quality-${{ hashFiles('setup.cfg', 'setup.py') }}
restore-keys: |
${{ runner.os }}-code-quality-

- name: Install required system packages only for Ubuntu Linux
run: |
sudo apt-get update
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pytest-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Test using Pytest in Docker

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
@property
def status(self):
return 200 if self.sync else 202

async def raise_for_status(self):
...

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_upload.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import hashlib

import pytest
from aleph_message.models import StoreMessage
from aleph_message.models import AlephMessage, StoreMessage
from aleph_message.status import MessageStatus

from aleph.sdk import AuthenticatedAlephHttpClient
Expand Down Expand Up @@ -33,7 +33,7 @@ async def test_upload_with_message():
server_content = await client.download_file(file_hash=file_hash)
assert server_content == content

server_message = await client.get_message(
server_message: AlephMessage = await client.get_message(
item_hash=message.item_hash, message_type=StoreMessage
)
assert server_message.content.item_hash == file_hash
assert server_message.content.item_hash == file_hash