Coder Social home page Coder Social logo

Comments (5)

shivammathur avatar shivammathur commented on June 11, 2024

@Sn0wCrack

Please provide the workflow you are using.
Also please ensure that you are specifying runner env as self-hosted.
https://github.com/shivammathur/setup-php?tab=readme-ov-file#self-hosted-setup

from setup-php.

Sn0wCrack avatar Sn0wCrack commented on June 11, 2024

It looks like I had some workflows that didn't have the self-hosted env, which is probably why this occurred.

I'll make this change and see if this resolves the issue by itself.

from setup-php.

shivammathur avatar shivammathur commented on June 11, 2024

@Sn0wCrack
Following up on this, were you able to fix it on your end.

from setup-php.

Sn0wCrack avatar Sn0wCrack commented on June 11, 2024

Sorry for not updating, had not had a change to test the changes after implementing them, took some time to go through all of our repositories as well, only a handful of workflows were missing the environment variable.

I've tested it again now after adding the runner environment variable and I still receive these warnings on those servers.

I'm assuming this fix won't be retroactive and I might have to manually remove the installed PHP 8.3 to have the action pull down the correct files again?

Here's my action workflow file for reference as well:

name: Continuous Integration

# Controls when the workflow will run
on:
  workflow_dispatch:
  push:
    branches: [ master ]
    paths:
      - '**.php'
      - '**.js'
      - '**.vue'
      - '**.ts'
      - '**.json'
      - '**.lock'
    tags-ignore:
      - 'v*'
  pull_request:
    branches: [ master ]
    paths:
      - '**.php'
      - '**.js'
      - '**.vue'
      - '**.ts'
      - '**.json'
      - '**.lock'

jobs:
  lint:
    runs-on: [ self-hosted, Linux, ci ]

    strategy:
      matrix:
        php-version: ['8.3']

    steps:
      - uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: bcmath, ctype, fileinfo, json, mbstring, openssl, pdo, pdo_mysql tokenizer
          tools: composer
        env:
          runner: self-hosted

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          cache: 'yarn'
          node-version: 'lts/iron'

      - name: Install JavaScript Dependencies
        run: yarn install --frozen-lockfile

      - name: Install PHP Dependencies
        uses: ramsey/composer-install@v3

      - name: Lint JavaScript
        run: yarn lint

      - name: Lint PHP
        run: ./vendor/bin/pint --test

  test:
    runs-on: [ self-hosted, Linux, ci ]

    services:
      database:
        image: mariadb:10
        env:
          MYSQL_DATABASE: database
          MYSQL_ALLOW_EMPTY_PASSWORD: false
          MYSQL_ROOT_PASSWORD: password
        ports:
          - 3306
        options: >-
          --health-cmd="mysqladmin ping"
          --health-interval=10s
          --health-timeout=5s
          --health-retries=3

      cache:
        image: redis:7
        ports:
          - 6379

    strategy:
      matrix:
        php-version: ['8.3']

    steps:
      - uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: bcmath, ctype, fileinfo, json, mbstring, openssl, pdo, pdo_mysql tokenizer, redis, igbinary, gd, imagick
          tools: composer
          coverage: pcov
        env:
          runner: self-hosted

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          cache: 'yarn'
          node-version: 'lts/iron'

      - name: Install JavaScript Dependencies
        run: yarn install --frozen-lockfile

      - name: Install PHP Dependencies
        uses: ramsey/composer-install@v3

      - name: Build JavaScript
        run: yarn dev

      - name: Setup tasks
        run: |
          touch .env
          php artisan storage:link

      - name: Run Tests
        run: php artisan test --coverage --parallel

from setup-php.

shivammathur avatar shivammathur commented on June 11, 2024

Yes, it will require manually removing the previously installed version.

from setup-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.