Skip to content

Commit c223997

Browse files
tests: test gh actions file added to see if it's working
1 parent 1f40bb8 commit c223997

File tree

5 files changed

+111
-6
lines changed

5 files changed

+111
-6
lines changed

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in the repo.
5+
6+
* @ernestmarcinko

.github/workflows/tests.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Run the github Continuous Integration
2+
name: CI
3+
4+
# Run this action on:
5+
on:
6+
7+
# When the repo is PUSHed to [main] branch
8+
pull_request:
9+
branches: [ main ]
10+
11+
# And allow a manual 'run' button in the github action tab
12+
workflow_dispatch:
13+
14+
# When run do this job:
15+
jobs:
16+
run:
17+
18+
# Use the operating system specified in the strategy 'matrix' below.
19+
runs-on: ${{ matrix.operating-system }}
20+
21+
# Matrix of variables
22+
strategy:
23+
matrix:
24+
operating-system: [ubuntu-latest]
25+
php-versions: ['8.3']
26+
27+
# Give the runner a title (using the matrix variables)
28+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
29+
30+
# Now do these steps.
31+
steps:
32+
33+
# Use the 'checkout' action (https://github.com/actions/checkout)
34+
# To pull this repo into the root of your container.
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
# Install PHP
39+
- name: Setup PHP
40+
# Using this repo
41+
uses: shivammathur/setup-php@v2
42+
# And these settings
43+
with:
44+
php-version: ${{ matrix.php-versions }} # Change the version to install with the matrix variables above.
45+
extensions: mbstring, intl #optional, setup extensions
46+
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
47+
coverage: xdebug #optional, setup coverage driver
48+
49+
# Check PHP is installed.
50+
# Weird Note - the next step 'composer install' fails if this PHP Check is not run.
51+
- name: Check PHP Version
52+
run: php -v
53+
54+
# Install composer to use your autoloader
55+
- name: Composer install
56+
run: composer install --optimize-autoloader --prefer-dist
57+
58+
# Check listing of directory
59+
# Also a quick example of multi-commands and the $GITHUB_WORKSPACE variable.
60+
- name: list dir
61+
run: |
62+
ls -la
63+
ls $GITHUB_WORKSPACE
64+
65+
# RUN, You fools.
66+
# Kick of the phpunit testsuite.
67+
- name: PHPUnit tests
68+
run: ./vendor/bin/phpunit

composer.json

+28-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
{
2-
"type": "library",
3-
"private": true,
4-
"autoload": {
5-
"psr-4": {
6-
"ErnestMarcinko\\WaifuVault\\": "src/"
2+
"name": "ernestmarcinko/waifuvault-php-api",
3+
"description": "SDK to interact with WaifuVault, a temporary file hosting service",
4+
"type": "library",
5+
"keywords": [
6+
"waifu",
7+
"file hosting",
8+
"temp file host",
9+
"temporary files",
10+
"file storage"
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"ErnestMarcinko\\WaifuVault\\": "src/"
15+
}
16+
},
17+
"autoload-dev": {
18+
"psr-4": {
19+
"ErnestMarcinko\\WaifuTests\\": "tests/WaifuTests/"
20+
}
21+
},
22+
"require-dev": {
23+
"phpstan/phpstan": "^1.10",
24+
"phpunit/phpunit": "11.*",
25+
"php-mock/php-mock": "^2.5",
26+
"squizlabs/php_codesniffer": "^3.8"
27+
},
28+
"require": {
29+
"php": "^8.3"
730
}
8-
}
931
}

phpunit.xml.dist

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" backupGlobals="false" colors="true" stopOnError="true" stopOnFailure="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
3+
<testsuites>
4+
<testsuite name="default">
5+
<directory>./tests/</directory>
6+
</testsuite>
7+
</testsuites>
8+
</phpunit>

tests/bootstrap.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php

0 commit comments

Comments
 (0)