Skip to content

Commit

Permalink
chore: update actions (#108)
Browse files Browse the repository at this point in the history
Updated to the following actions versions:

checkout@v4
setup-node@v4

Replaced yarn cache setup that previously used actions/cache with actions/setup-node

Removed OS matrix, set runner to ubuntu-latest and node-version to 18.

Additionally, updated README with NearForm banner/badges.
  • Loading branch information
djm158 authored Jan 10, 2025
1 parent e7f35be commit 4eeef58
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 50 deletions.
42 changes: 9 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,23 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
# TODO(68): Add `windows-latest` and support.
os: [ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# Note: Yarn root cache restore is slow (1:30) on Windows, so only do on Linux.
- name: Get Yarn cache directory
if: runner.os != 'Windows'
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Use Yarn cache
if: runner.os != 'Windows'
uses: actions/cache@v2
id: yarn-cache
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-${{ matrix.node-version }}-
yarn-${{ runner.os }}-
node-version: 18
cache: "yarn"

- name: Use node_modules cache
id: node-modules-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('./yarn.lock') }}
key: node-modules-${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}-${{ matrix.node-version }}-
node-modules-${{ runner.os }}-
- name: Project installation
Expand All @@ -67,4 +43,4 @@ jobs:
env:
# Webpack fails due to crypto enforcements in Node 17+
# See, e.g., https://github.com/webpack/webpack/issues/14532
NODE_OPTIONS: ${{ matrix.node-version == '18.x' && '--openssl-legacy-provider' || '' }}
NODE_OPTIONS: "--openssl-legacy-provider"
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
[![Webpack Stats Plugin — Formidable, We build the modern web](https://raw.githubusercontent.com/FormidableLabs/webpack-stats-plugin/master/webpack-stats-plugin-Hero.png)](https://formidable.com/open-source/)

[![npm version][npm_img]][npm_site]
[![Actions Status][actions_img]][actions_site]
[![MIT license][lic_img]][lic_site]
[![Maintenance Status][maintenance_image]](#maintenance-status)
<a href="https://commerce.nearform.com/open-source/" target="_blank">
<img alt="Webpack Stats Plugin" src="https://oss.nearform.com/api/banner.svg?badge=Webpack%20Stats%20Plugin&bg=e8b25a" />
</a>

<br />
<br />

<p align="center">
<a href="https://npmjs.com/package/webpack-stats-plugin">
<img alt="weekly downloads" src="https://img.shields.io/npm/dw/webpack-stats-plugin">
</a>
<a href="https://npmjs.com/package/webpack-stats-plugin">
<img alt="current version" src="https://img.shields.io/npm/v/webpack-stats-plugin">
</a>
<a href="https://github.com/FormidableLabs/webpack-stats-plugin/actions">
<img alt="build status" src="https://github.com/FormidableLabs/webpack-stats-plugin/actions/workflows/ci.yml/badge.svg">
</a>
<a href="https://github.com/FormidableLabs/webpack-stats-plugin#maintenance-status">
<img alt="Maintenance Status" src="https://img.shields.io/badge/maintenance-active-green.svg?color=brightgreen&style=flat" />
</a>
<a href="https://github.com/FormidableLabs/webpack-stats-plugin/blob/main/LICENSE.txt">
<img alt="license" src="https://img.shields.io/npm/l/webpack-stats-plugin?color=brightgreen&style=flat">
</a>
</p>

This plugin will ingest the webpack [stats](https://webpack.js.org/configuration/stats/#stats) object, process / transform the object and write out to a file for further consumption.

Expand Down Expand Up @@ -199,12 +217,4 @@ In earlier webpack, the plugin uses the much later [`emit`](https://webpack.js.o

## Maintenance Status

**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

[npm_img]: https://badge.fury.io/js/webpack-stats-plugin.svg
[npm_site]: http://badge.fury.io/js/webpack-stats-plugin
[actions_img]: https://github.com/FormidableLabs/webpack-stats-plugin/workflows/CI/badge.svg
[actions_site]: https://github.com/FormidableLabs/webpack-stats-plugin/actions
[lic_img]: https://img.shields.io/npm/l/webpack-stats-plugin.svg?color=brightgreen&style=flat
[lic_site]: https://github.com/FormidableLabs/webpack-stats-plugin/blob/main/LICENSE.txt
[maintenance_image]: https://img.shields.io/badge/maintenance-active-green.svg?color=brightgreen&style=flat
**Active:** NearForm is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

0 comments on commit 4eeef58

Please sign in to comment.