Skip to main content

Add a basic test setup

ID
815196c
date
2024-05-16 20:14:19+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
6148ce1
message
Add a basic test setup
changed files
5 files, 51 additions

Changed files

.github/workflows/test.yml (0) → .github/workflows/test.yml (496)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..d798fd7
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,30 @@
+name: Test
+
+on:
+  push:
+    branches:
+    - main
+
+  pull_request:
+    branches:
+    - main
+
+jobs:
+  test:
+    runs-on: macos-latest
+
+    steps:
+    - uses: actions/checkout@v4
+
+    - name: Set up Python
+      uses: actions/setup-python@v5
+      with:
+        python-version: "3.12"
+        cache: 'pip'
+        cache-dependency-path: 'dev_requirements.txt'
+
+    - name: Install dependencies
+      run: pip install -r dev_requirements.txt
+
+    - name: Run tests
+      run: python3 -m pytest tests

.gitignore (0) → .gitignore (6)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc

dev_requirements.in (0) → dev_requirements.in (7)

diff --git a/dev_requirements.in b/dev_requirements.in
new file mode 100644
index 0000000..e079f8a
--- /dev/null
+++ b/dev_requirements.in
@@ -0,0 +1 @@
+pytest

dev_requirements.txt (0) → dev_requirements.txt (277)

diff --git a/dev_requirements.txt b/dev_requirements.txt
new file mode 100644
index 0000000..13d0142
--- /dev/null
+++ b/dev_requirements.txt
@@ -0,0 +1,14 @@
+#
+# This file is autogenerated by pip-compile with Python 3.11
+# by the following command:
+#
+#    pip-compile dev_requirements.in
+#
+iniconfig==2.0.0
+    # via pytest
+packaging==24.0
+    # via pytest
+pluggy==1.5.0
+    # via pytest
+pytest==8.2.0
+    # via -r dev_requirements.in

tests/test_save_safari_webarchive.py (0) → tests/test_save_safari_webarchive.py (59)

diff --git a/tests/test_save_safari_webarchive.py b/tests/test_save_safari_webarchive.py
new file mode 100755
index 0000000..b0ec0b3
--- /dev/null
+++ b/tests/test_save_safari_webarchive.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+
+
+def test_truth():
+    assert True