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

[PAYSHIP-2824] GitHub workflow PS8 #1231

Merged
merged 35 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
030e7e7
GitHub workflow PS8
seiwan May 7, 2024
3bd26e2
Trigger production workflow only with new release
seiwan May 7, 2024
6e514ea
Adapt secrets and buckets storage
seiwan Jun 4, 2024
5ca2d35
Add permissions
seiwan Jun 5, 2024
28e5c90
devops: comments jobs
Jun 5, 2024
ae909e5
Add auth-gcp Github action
seiwan Jun 6, 2024
f4c9a7c
Change actions/checkout version
seiwan Jun 6, 2024
8ee7524
Change actions/checkout version
seiwan Jun 6, 2024
52ddc33
Test
seiwan Jun 6, 2024
8dc739c
Fix zip generation
seiwan Jun 6, 2024
4b850e1
Fix push to bucket storage
seiwan Jun 6, 2024
4c96371
Fix .env writting
seiwan Jun 6, 2024
104f80a
Fix .env writting
seiwan Jun 7, 2024
20b5ee5
Add date to zip name
seiwan Jun 10, 2024
897974a
Update .gitignore
seiwan Jun 10, 2024
34a468a
Fix CI
seiwan Jun 10, 2024
364f042
Fix CI
seiwan Jun 10, 2024
905181c
Set date +2h on zip name
seiwan Jun 11, 2024
5946786
Adapt production workflow
seiwan Jun 11, 2024
dcc6f65
Fix auth GCP action
seiwan Jun 11, 2024
108a5ef
Fix writting env file
seiwan Jun 11, 2024
1830393
Exclude folders _dev and tests for the zip generation
seiwan Jun 11, 2024
f99ec7c
Exclude folders _dev and tests for the zip generation
seiwan Jun 11, 2024
ac3deed
Exclude folders _dev and tests for the zip generation
seiwan Jun 11, 2024
919743d
Exclude package.* files from zip generation
seiwan Jun 13, 2024
f011e92
Add ps8-clean-buckets workflow
seiwan Jun 14, 2024
43ed9a0
Fix zip installation on PrestaShop
seiwan Jul 12, 2024
9e913eb
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
4243a5a
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
f6d9f5a
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
b781296
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
0fca0f1
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
5db55db
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
52691da
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
a279495
Fix zip installation on PrestaShop
seiwan Jul 15, 2024
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
86 changes: 86 additions & 0 deletions .github/actions/auth-gcp/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: 'Auth GCP'
description: 'Auth gcp, can login to docker artifact registry or install the sdk'
inputs:
auth-mode:
description: 'Authentication mode (workload-federation or json-file)'
required: true
type: choice
options:
- workload-federation
- json-file
default: 'workload-federation'
registry-login:
required: false
type: bool
default: false
credentials-json:
required: false
type: string
setup-gcloud:
required: false
type: bool
default: false
service-account:
required: false
description: Service account email
type: string
provider:
required: false
description: gcp workload identity provider
type: string
gcp-registry-region:
required: false
description: docker registry gcp
default: "europe-west1-docker.pkg.dev"
type: string
sdk-version:
required: true
description: which version of google dsl you want to suer
default: '>=457.0.0'
type: string
gke-cluster-name:
required: false
description: 'If you put the cluster name in this variable it will activate auth to make kubectl'
default: ''
type: string
cluster-region:
required: false
description: 'Cluster region'
type: choice
options:
- europe-west1
default: 'europe-west1'

runs:
using: 'composite'
steps:
- name: Authenticate to Google Cloud with Workload Federation 🔐
if: ${{ inputs.auth-mode == 'workload-federation' }}
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ inputs.provider }}
service_account: ${{ inputs.service-account }}

- name: Authenticate to Google Cloud with a JSON file 🔐 (THIS IS DEPRECATED ❌)
if: ${{ inputs.auth-mode == 'json-file' }}
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ inputs.credentials-json }}

- name: Setting up gcloud SDK 🛠
if: ${{ inputs.setup-gcloud == 'true' }}
uses: google-github-actions/setup-gcloud@v2
with:
version: ${{ inputs.sdk-version }}

- name: Login to Docker artifact registry 🐳
if: ${{ inputs.registry-login == 'true' }}
shell: bash
run: gcloud auth configure-docker ${{ inputs.gcp-registry-region }}

- name: Add cluster authentification 🧊
if: ${{ inputs.gke-cluster-name != '' }}
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: '${{ inputs.gke-cluster-name }}'
location: '${{ inputs.cluster-region }}'
93 changes: 0 additions & 93 deletions .github/workflows/build-release.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
js-linter:
name: JS linter
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ name: PHP tests
on:
push:
branches:
- 'master'
- 'prestashop/8.x'
- "master"
- "prestashop/8.x"
pull_request:
types: [opened, reopened, synchronize, edited]

jobs:
header-stamp:
name: Check license headers
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: "7.4"

- name: Cache vendor folder
uses: actions/cache@v1
Expand All @@ -36,9 +37,11 @@ jobs:

- name: Run Header Stamp in Dry Run mode
run: php vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=.github,node_modules,vendor,tests,_dev --dry-run

php-linter:
name: PHP Syntax check 7.2|7.3|7.4
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -48,20 +51,24 @@ jobs:
uses: prestashop/github-action-php-lint/7.3@master
- name: PHP syntax checker 7.4
uses: prestashop/github-action-php-lint/7.4@master

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/[email protected]
- name: Run PHP-CS-Fixer
uses: prestashopcorp/github-action-php-cs-fixer@master

phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['8.0.0', 'latest']
presta-versions: ["8.0.0", "latest"]
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -83,19 +90,21 @@ jobs:
- name: Pull PrestaShop files (Tag ${{ matrix.presta-versions }})
run: docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }}

- name : Run PHPStan
- name: Run PHPStan
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan:0.12 analyse --configuration=/web/module/tests/phpstan/phpstan-PS-8.neon --error-format github

phpunit:
name: PHPUnit
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'ready to review')
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: "7.4"

- name: Cache vendor folder
uses: actions/cache@v1
Expand Down
Loading
Loading