Skip to content

Commit

Permalink
Merge pull request #144 from PHPCSStandards/feature/ghactions-xmllint…
Browse files Browse the repository at this point in the history
…-bypass-apt-get-update

GH Actions: work around intermittent apt-get errors
  • Loading branch information
jrfnl committed Apr 24, 2024
2 parents bdc6304 + d1b3f7d commit 8ec7300
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ jobs:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
# This should not be blocking for this job, so ignore any errors from this step.
# Ref: https://github.com/dotnet/core/issues/4167
- name: Update the available packages list
continue-on-error: true
run: sudo apt-get update

# @link http://xmlsoft.org/xmllint.html
- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libxml2-utils
run: sudo apt-get install --no-install-recommends -y libxml2-utils

- name: Download the XSD schema
run: curl http://www.w3.org/2001/XMLSchema.xsd --output XMLSchema.xsd
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
# This should not be blocking for this job, so ignore any errors from this step.
# Ref: https://github.com/dotnet/core/issues/4167
- name: Update the available packages list
continue-on-error: true
run: sudo apt-get update

- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libxml2-utils
run: sudo apt-get install --no-install-recommends -y libxml2-utils

# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
# This should not be blocking for this job, so ignore any errors from this step.
# Ref: https://github.com/dotnet/core/issues/4167
- name: Update the available packages list
continue-on-error: true
run: sudo apt-get update

- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libxml2-utils
run: sudo apt-get install --no-install-recommends -y libxml2-utils

- name: Setup ini config
id: set_ini
Expand Down

0 comments on commit 8ec7300

Please sign in to comment.