Photo by Chris G on Pexels.com

githubのworkflowsを

2024.03.05

Logging

おはようございます、個人用に初めてgithubのAction用のymlを作ったって話です。githubで個人でactionを使う場合、公開設定、非公開設定ともに使えるようですね、使えないみたいな記述の記事を見かけましたが…。因みに静的解析ツールは導入していません。PHPStanみたいなものは導入していません。仕事では静的解析ツールも導入していますが個人で今回のように雛🐣レベルの開発には必要ないかなって。後々、追加するかもしれませんが?

black flat screen computer monitor
Photo by Markus Winkler on Pexels.com

自分が作ったYmlファイルはこちらでも公開しときますね。actionが成功するまでにかなりの失敗(エラー)を繰り返しましたところが(泣)ですね~。一回では上手く動作してくれず試行錯誤しました良い学びにはなりましたが👍。

name: testing

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
defaults:
  run:
    working-directory: ./turi-map-app
jobs:
  laravel-test:
    runs-on: ubuntu-latest
    services:
      mysql:
        image: mysql:5.7
        ports:
          - 3306:3306
        env:
          MYSQL_ROOT_PASSWORD: turi
          MYSQL_DATABASE: turi
          MYSQL_USER: turi
          MYSQL_PASSWORD: turi
          MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        options: --health-cmd "mysqladmin ping -h 127.0.0.1" --health-interval 20s --health-timeout 10s --health-retries 10
    strategy:
      matrix:
        node-version: [21.x]
    steps:
    - uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
      with:
        php-version: '8.2'
        extensions: mbstring, dom, fileinfo, pdo_mysql, PDO, zip
    - uses: actions/checkout@v4
    - name: Copy .env
      run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
    - name: Install Dependencies
      run: composer install -n --prefer-dist
    - name: Generate key
      run: php artisan key:generate
    - name: storage link
      run: php artisan storage:link
    - name: Directory Permissions
      run: chmod -R 777 storage bootstrap/cache
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
    - name: npm install
      run: npm i
    - name: Build Assets
      run: npm run build
    - name: migrate
      run: php artisan migrate
    - name: Execute tests (Unit and Feature tests) via PHPUnit
      run: php artisan test

明日へ続く。

著者名  @taoka_toshiaki

Profile
高知県在住の@taoka_toshiakiです、記事を読んで頂きありがとうございます.
数十年前から息を吸うように日々記事を書いてます.たまに休んだりする日もありますがほぼ毎日投稿を心掛けています😅.
SNSも使っています、フォロー、いいね、シェア宜しくお願い致します🙇.
SNS::@taoka_toshiaki

タグ

actions, chmod, defaults, dom, env, extensions, generate, health-cmd, health-timeout, matrix, migrate, MYSQL, password, PDO, ports, services, steps, strategy, Testing, working-directory,

strategy

2018.01.12

Logging


Mr. Trump’s regime will not continue….
The Abe administration will not continue…
Both are continuing!!
Why will it continue?
Answer
1.The timing was good.
2.The surroundings have good talent.
3.honeymouthed.
The economy is not necessarily upward in the future.
Perhaps the economy slows down in several years.
At that time, the Abe administration and the Trump regime will lose ground.

著者名  @taoka_toshiaki

Profile
高知県在住の@taoka_toshiakiです、記事を読んで頂きありがとうございます.
数十年前から息を吸うように日々記事を書いてます.たまに休んだりする日もありますがほぼ毎日投稿を心掛けています😅.
SNSも使っています、フォロー、いいね、シェア宜しくお願い致します🙇.
SNS::@taoka_toshiaki

タグ

1.The timing was good, 2.The surroundings have good talent, 3.honeymouthed, ANSWER, At that time, Both are continuing, Fire and Fury, jp, Mr, Perhaps the economy slows down in several, strategy, the Abe administration and the Trump regime, The Abe administration will not continue, The economy is not necessarily upward, Trump's regime will not continue, Why will it continue,