Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] ✅ updated Github actions #114

Merged
merged 7 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ libraries/**
coverage/**
assets/build/**
tests/**
modules/legacy/assets/**
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ jobs:
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
env:
fail-fast: 'true'

- name: OAuth Composer Authentication
run:
composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install Composer dependencies cache
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Install Composer dependencies
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/php-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
Expand All @@ -39,11 +39,8 @@ jobs:
phpcs -i
composer --version

- name: Oauth Composer authentication
run: composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # 2.2.0
uses: ramsey/composer-install@v3

- name: Add error matcher
run: echo "::add-matcher::$(pwd)/.github/checkstyle-problem-matcher.json"
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
MYSQL_DATABASE: wordpress_test
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Matrix variables
id: matrix
Expand All @@ -76,7 +76,7 @@ jobs:
fi

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
coverage: ${{ steps.coverage.outputs.coverage }}
ini-values: ${{ steps.coverage.outputs.ini }}
Expand All @@ -89,12 +89,8 @@ jobs:
wget -q -O /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${{ matrix.phpunit }}.phar"
chmod +x /usr/local/bin/phpunit

- name: Oauth Composer authentication
run:
composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # 2.2.0
uses: ramsey/composer-install@v3

#- name: Install Node.js
# uses: actions/setup-node@v2
Expand All @@ -108,7 +104,7 @@ jobs:
# run: npm run build

- name: Set up WordPress and WordPress Test Library
uses: sjinks/setup-wordpress-test-library@dd7f8144e892b042e034d713b734f7a19446abe1 # 2.0.1
uses: sjinks/setup-wordpress-test-library@master
with:
version: ${{ matrix.wp }}

Expand Down Expand Up @@ -137,10 +133,3 @@ jobs:
OPTIONS="$OPTIONS --coverage-clover=clover.xml"
fi
phpunit --order-by=random ${OPTIONS}

- name: Upload coverage report
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
files: clover.xml
flags: unittests
if: ${{ steps.coverage.outputs.coverage != 'none' }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ vendor/
composer.lock
npm-debug.log
.DS_Store
package-lock.json
bin/.env
*/node_modules
!assets/dev/*
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint:js
2 changes: 1 addition & 1 deletion includes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Manager {
public static function get_module_list(): array {
return [
'Legacy',
'Settings'
'Settings',
];
}

Expand Down
1 change: 0 additions & 1 deletion modules/settings/assets/js/hooks/use-auth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import API from '../api';
import { UPGRADE_LINK } from '../constants';
import { usePluginSettingsContext } from '../context/plugin-settings-context';

const useAuth = () => {
const { subscriptionId } = 123;
Expand Down
Loading
Loading