mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
023efb6f03
* CI: add Node.js 22, drop non-LTS 21 * CI: update actions versions 3 -> 4 Previous actions version showed deprecation warnings when run. Update them to V4
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
name: 'CI'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
- '*/*'
|
|
- '**'
|
|
- '!sponsors'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
- '*/*'
|
|
- '**'
|
|
- '!sponsors'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x]
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: true
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v40
|
|
- name: List all changed files
|
|
run: |
|
|
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
echo "$file was changed"
|
|
done
|
|
- name: Check changes
|
|
id: changed-ignored
|
|
uses: tj-actions/changed-files@v40
|
|
with:
|
|
files: |
|
|
**.md
|
|
sandbox/**
|
|
examples/**
|
|
.github/**
|
|
templates/**
|
|
bin/**
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
if: steps.changed-ignored.outputs.only_modified == 'false'
|
|
- run: npm ci
|
|
if: steps.changed-ignored.outputs.only_modified == 'false'
|
|
- run: npm test
|
|
if: steps.changed-ignored.outputs.only_modified == 'false'
|