Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix(ci): migration to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Jan 27, 2021
1 parent 4ef0759 commit 6875aac
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 38 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release
on: [push, pull_request]

jobs:
test:
name: Test @ PHP ${{ matrix.php-version }} - x86 - ubuntu-latest
# Support [skip ci] out of box with github actions Workaround
# Only works for push https://github.com/actions/runner/issues/774
if: github.event_name == 'pull_request' || (github.event_name == 'push' && contains(toJson(github.event.commits), '[skip ci]') == false)
strategy:
matrix:
php-version:
- 7.4
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS LTS
uses: actions/setup-node@v2
- name: Install dependencies
run: |
npm prune
npm i
- name: Install Dependencies::PHP${{ matrix.php-version }}
run: |
echo "$HOME/.composer/vendor/bin" >> $GITHUB_PATH
composer global require dealerdirect/phpcodesniffer-composer-installer roave/security-advisories:dev-master squizlabs/php_codesniffer phpcompatibility/php-compatibility
# TODO migrate the below to gulp calls
- name: Check PHP Compatibility
run: phpcs --standard=PHPCompatibility -q -n --colors --runtime-set testVersion ${{ matrix.php-version }} --extensions=php --ignore=node_modules,vendor,templates_c . || exit 1;
- name: Check PSR12 Standard
run: phpcs --standard=PSR12 -q -n --colors --extensions=php,inc,lib --ignore=node_modules,vendor,templates_c .
- name: Check Linting
run: npm run lint
release:
name: Release @ NodeJS LTS - x86 - ubuntu-latest
runs-on: ubuntu-latest
needs:
- test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup NodeJS LTS
uses: actions/setup-node@v2
- name: Install dependencies
run: |
npm prune
npm i
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WHMCSMP_LOGIN: ${{ secrets.WHMCSMP_LOGIN }}
WHMCSMP_PASSWORD: ${{ secrets.WHMCSMP_PASSWORD }}
WHMCSMP_PRODUCTID: ${{ secrets.WHMCSMP_PRODUCTID_ISPAPI_DOMAINCHECKER }}
run: npx semantic-release
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

0 comments on commit 6875aac

Please sign in to comment.