Skip to content

Commit 025674b

Browse files
committed
github: actions: Simplify workflow configurations by removing branch restrictions and consolidating setup steps
1 parent f946141 commit 025674b

File tree

3 files changed

+35
-40
lines changed

3 files changed

+35
-40
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ name: linter
22

33
on:
44
push:
5-
branches:
6-
- develop
7-
- main
85
pull_request:
9-
branches:
10-
- develop
11-
- main
126

137
permissions:
148
contents: write

.github/workflows/locals.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: locals
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ci:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
locals: ['en', 'he']
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Server
20+
uses: ./actions/setup-server
21+
22+
- name: Check Missing Translations for ${{ matrix.locals }}
23+
run: |
24+
MISSING=$(php artisan translations:find-missing --print --source=${{ matrix.locals }})
25+
LINES=$(echo "$MISSING" | wc -l)
26+
27+
if [ "$LINES" -gt 1 ]; then
28+
echo "Found missing translations for ${{ matrix.locals }}: $MISSING"
29+
exit 1
30+
else
31+
echo "No missing translations for ${{ matrix.locals }}"
32+
fi

.github/workflows/tests.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,18 @@ name: tests
22

33
on:
44
push:
5-
branches:
6-
- develop
7-
- main
85
pull_request:
9-
branches:
10-
- develop
11-
- main
126

137
jobs:
148
ci:
159
runs-on: ubuntu-latest
1610

1711
steps:
18-
- name: Checkout
12+
- name: Checkout Code
1913
uses: actions/checkout@v4
2014

21-
- name: Setup PHP
22-
uses: shivammathur/setup-php@v2
23-
with:
24-
php-version: 8.4
25-
tools: composer:v2
26-
coverage: xdebug
27-
28-
- name: Setup Node
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: '22'
32-
cache: 'npm'
33-
34-
- name: Install Node Dependencies
35-
run: npm ci
36-
37-
- name: Build Assets
38-
run: npm run build
39-
40-
- name: Install Dependencies
41-
run: composer install --no-interaction --prefer-dist --optimize-autoloader
42-
43-
- name: Copy Environment File
44-
run: cp .env.example .env
45-
46-
- name: Generate Application Key
47-
run: php artisan key:generate
15+
- name: Setup Server
16+
uses: ./actions/setup-server
4817

4918
- name: Tests
5019
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)