Skip to content

Commit

Permalink
Merge pull request #93 from AuthorizeNet/future
Browse files Browse the repository at this point in the history
Future
  • Loading branch information
gnongsie authored Sep 18, 2024
2 parents bd15ff9 + cad109e commit 7ff7ded
Show file tree
Hide file tree
Showing 15 changed files with 3,125 additions and 2,643 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/nodejs-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Authorize.net Node.js CI
on:
push:
pull_request:
workflow_dispatch:
env:
sdk_node: 'sdk-node'
sample_code_node: 'sample-code-node'
local_npm_folder: 'local-npm-folder'
jobs:
workflow-job:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
node-ver: [14.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
exclude:
- operating-system: macos-latest
node-ver: 14.x
include:
- operating-system: macos-13
node-ver: 14.x
runs-on: ${{matrix.operating-system}}
steps:
- name: Creating separate folders for SDK and Sample Codes
run: |
rm -rf $sdk_node
rm -rf $sample_code_node
mkdir $sdk_node $sample_code_node
- name: Checkout authorizenet/sdk-node
uses: actions/checkout@v4
with:
path: ${{env.sdk_node}}

- name: Checkout authorizenet/sample-code-node
uses: actions/checkout@v4
with:
repository: 'authorizenet/sample-code-node'
ref: 'future'
path: ${{env.sample_code_node}}

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-ver}}

- name: Install and Test
run: |
cd $sdk_node
npm install
npm test
npm pack
PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -n 1)
cd ../$sample_code_node
npm install
npm install file:../$sdk_node/authorizenet-$PACKAGE_VERSION.tgz
if [[ ${{matrix.node-ver}} = 14* ]]; then
npm install [email protected]
fi
npm list
node test-runner.js
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Authorize.Net Node.js SDK

[![Travis CI Status](https://travis-ci.org/AuthorizeNet/sdk-node.svg?branch=master)](https://travis-ci.org/AuthorizeNet/sdk-node)
[![Authorize.net Node.js CI](https://github.com/AuthorizeNet/sdk-node/actions/workflows/nodejs-workflow.yml/badge.svg?branch=master)](https://github.com/AuthorizeNet/sdk-node/actions/workflows/nodejs-workflow.yml)
[![NPM version](https://badge.fury.io/js/authorizenet.png)](http://badge.fury.io/js/authorizenet)


## Requirements
* Node.js version 10.0.0 or higher
* Node.js version 14.x.x or higher
* An Authorize.Net account (see _Registration & Configuration_ section below)

### Contribution
Expand Down
Loading

0 comments on commit 7ff7ded

Please sign in to comment.