Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
mhennoch committed Feb 3, 2025
1 parent 4bd7336 commit 83aa413
Showing 1 changed file with 83 additions and 116 deletions.
199 changes: 83 additions & 116 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ jobs:
name: prebuilds-linux-${{ matrix.node_api_target }}
path: prebuilds

merge-prebuilds-linux:
runs-on: ubuntu-latest
needs: prebuilds-linux
steps:
- name: Merge Linux Prebuilds
uses: actions/upload-artifact/merge@v4
with:
name: prebuilds-linux
pattern: prebuilds-linux-*

prebuilds-linux-arm64:
runs-on: [self-hosted, Linux, ARM64]
strategy:
Expand All @@ -69,16 +59,6 @@ jobs:
name: prebuilds-linux-arm64-${{ matrix.node_api_target }}
path: prebuilds

merge-prebuilds-linux-arm64:
runs-on: ubuntu-latest
needs: prebuilds-linux-arm64
steps:
- name: Merge Linux ARM64 Prebuilds
uses: actions/upload-artifact/merge@v4
with:
name: prebuilds-linux-arm64
pattern: prebuilds-linux-arm64-*

prebuilds-macos-windows:
strategy:
fail-fast: false
Expand Down Expand Up @@ -108,18 +88,8 @@ jobs:
name: prebuilds-${{ runner.os }}-${{ matrix.node_api_target }}
path: prebuilds

merge-prebuilds-macos-windows:
runs-on: ubuntu-latest
needs: prebuilds-macos-windows
steps:
- name: Merge macOS & Windows Prebuilds
uses: actions/upload-artifact/merge@v4
with:
name: prebuilds-macos-windows
pattern: prebuilds-*

create-package:
needs: [merge-prebuilds-linux, merge-prebuilds-linux-arm64, merge-prebuilds-macos-windows]
needs: [prebuilds-linux, prebuilds-linux-arm64, prebuilds-macos-windows]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -137,11 +107,8 @@ jobs:
path: prebuilds
- name: copy prebuilds
run: |
mkdir -p prebuilds
ls
cp -r prebuilds-linux/* prebuilds
cp -r prebuilds-macos-windows/* prebuilds
cp -r prebuilds-linux-arm64/* prebuilds
ls prebuilds
- name: Install npm dependencies
run: npm ci --ignore-scripts
- name: Build
Expand All @@ -156,63 +123,63 @@ jobs:
name: ${{ steps.pack.outputs.package_file }}
path: ${{ steps.pack.outputs.package_file }}

unit-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
nodejs: ['18', '20', '21', '22', '23']
include:
- os: 'macos-latest'
python_version: '3.11'
- os: 'windows-2019'
nodejs: '18.20.1'
- os: 'windows-2019'
nodejs: '20.12.1'
- os: 'windows-2019'
nodejs: '21.7.2'
- os: 'windows-2019'
nodejs: '22.10.0'
- os: 'windows-2019'
nodejs: '23.0.0'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs }}
- name: Install npm dependencies
run: npm ci
- name: Test
run: npm run test
- name: Report Coverage
if: ${{matrix.nodejs == '16' && matrix.os == 'ubuntu-latest'}}
uses: codecov/codecov-action@v3
with:
verbose: true
# unit-tests:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: ['ubuntu-latest', 'macos-latest']
# nodejs: ['18', '20', '21', '22', '23']
# include:
# - os: 'macos-latest'
# python_version: '3.11'
# - os: 'windows-2019'
# nodejs: '18.20.1'
# - os: 'windows-2019'
# nodejs: '20.12.1'
# - os: 'windows-2019'
# nodejs: '21.7.2'
# - os: 'windows-2019'
# nodejs: '22.10.0'
# - os: 'windows-2019'
# nodejs: '23.0.0'
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python_version }}
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.nodejs }}
# - name: Install npm dependencies
# run: npm ci
# - name: Test
# run: npm run test
# - name: Report Coverage
# if: ${{matrix.nodejs == '16' && matrix.os == 'ubuntu-latest'}}
# uses: codecov/codecov-action@v3
# with:
# verbose: true

unit-tests-arm64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ARM64']
nodejs: ['18', '20', '21', '22', '23']
container: node:${{ matrix.nodejs }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install npm dependencies
run: npm ci --unsafe-perm
- name: Test
run: npm run test
# unit-tests-arm64:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: ['ARM64']
# nodejs: ['18', '20', '21', '22', '23']
# container: node:${{ matrix.nodejs }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python_version }}
# - name: Install npm dependencies
# run: npm ci --unsafe-perm
# - name: Test
# run: npm run test

build:
runs-on: ubuntu-latest
Expand All @@ -236,28 +203,28 @@ jobs:
name: splunk-otel-js-metadata.yaml
path: splunk-otel-js-metadata.yaml

e2e-local:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: ''
name: 'Basic'
- target: '-f express.override.yml'
name: 'Express'
- target: '-f mixed.override.yml'
name: 'Mixed'
- target: '-f log-injection.override.yml'
name: 'Log injection'
- target: '-f profiling.override.yml'
name: 'Profiling'
- target: '-f typescript.override.yml'
name: 'TypeScript'
name: e2e local ${{ matrix.name }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test ${{ matrix.name }} example
working-directory: test/examples
run: docker compose -f e2e.docker-compose.yml ${{ matrix.target }} up --exit-code-from test
# e2e-local:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: ''
# name: 'Basic'
# - target: '-f express.override.yml'
# name: 'Express'
# - target: '-f mixed.override.yml'
# name: 'Mixed'
# - target: '-f log-injection.override.yml'
# name: 'Log injection'
# - target: '-f profiling.override.yml'
# name: 'Profiling'
# - target: '-f typescript.override.yml'
# name: 'TypeScript'
# name: e2e local ${{ matrix.name }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Test ${{ matrix.name }} example
# working-directory: test/examples
# run: docker compose -f e2e.docker-compose.yml ${{ matrix.target }} up --exit-code-from test

0 comments on commit 83aa413

Please sign in to comment.