Skip to content

Commit

Permalink
Update to nixos-24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Jun 20, 2024
1 parent 9aed046 commit 416fa12
Show file tree
Hide file tree
Showing 15 changed files with 1,100 additions and 1,285 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
143 changes: 111 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,116 @@
name: ci

on:
push:
branches:
- master
- github-actions
- ci
pull_request:
branches:
- master
push:
branches:
- master
- develop
- ci
pull_request:
branches:
- master

permissions:
contents: read

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ["7.3", "7.4", "8.0"]
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: bcmath
coverage: xdebug
tools: phpunit

- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-dev

- name: PHP test
run: phpunit
lint:
runs-on: ubuntu-latest
name: "Lint | PHP ${{ matrix.php-version }}"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
# include:
# - php-version: "8.4"
# allow-failure: "true"
# continue-on-error: ${{ matrix.allow-failure == 'true' }}
steps:
- uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: bcmath, gmp

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=php+

# - name: phpcs
# run: php vendor/bin/phpcs
#
# - name: phpstan
# run: php vendor/bin/phpstan analyze

test:
runs-on: ubuntu-latest
name: "Test | PHP ${{ matrix.php-version }}"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
# include:
# - php-version: "8.4"
# allow-failure: "true"
# continue-on-error: ${{ matrix.allow-failure == 'true' }}
steps:
- uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: pcov
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: bcmath, gmp

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=php+

- name: Run test suite
run: php vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml

# - name: Coveralls
# uses: coverallsapp/github-action@v2
# with:
# file: clover.xml
# format: clover
# parallel: true

# finish:
# needs: test
# if: ${{ always() }}
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@v2
# with:
# parallel-finished: true
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/vendor/
.direnv
.idea
.phpunit*cache
.pre-commit-config.yaml
/vendor/
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"DrQue\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DrQue\\PolynomialRegression\\Tests\\": "tests"
}
},
"description" : "Calculates and returns coefficients for polynomial regression.",
"homepage": "http://www.drque.net/Projects/PolynomialRegression/",
"name" : "dr-que/polynomial-regression",
Expand All @@ -19,12 +24,12 @@
"regression",
"math"
],
"license": "GPL-2.0",
"license": "GPL-2.0-or-later",
"require" : {
"php" : ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^7.4"
"phpunit/phpunit": ">=7.4"
},
"type" : "library"
}
}
Loading

0 comments on commit 416fa12

Please sign in to comment.