Skip to content

Commit

Permalink
Add new workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikatsay authored and jjleng committed Apr 20, 2024
1 parent 539f453 commit d7c4ed2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/pull-request-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Run tests on pr"

run-name: ${{ github.actor }} has create a pull request 💻

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install poetry
run: pip3 install poetry

- name: Install dependencies
run: poetry install

- name: Test with pytest
run: make test

5 changes: 4 additions & 1 deletion tests/container/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ def test_installation_on_different_systems(
) as mock_requests, patch(
"tempfile.NamedTemporaryFile"
), patch(
"tarfile.open"
"tarfile.open",
return_value=MagicMock(),
) as mock_tarfile, patch(
"zipfile.ZipFile"
) as mock_zipfile, patch(
"os.makedirs"
), patch(
"os.unlink"
), patch(
"os.chmod"
):
install_pack()

Expand Down

0 comments on commit d7c4ed2

Please sign in to comment.