build #166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot**' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.9.0] | |
redis-version: [6.0.14] | |
env: | |
DO_COVERALLS: 20.9.0/6.0.14 | |
steps: | |
- name: Setup Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Checkout from Git | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
ssh-key: ${{ secrets.MERCATALYST_DEPLOY_KEY }} | |
- name: Run npm install | |
run: npm install | |
- name: Setup Redis ${{ matrix.redis-version }} | |
uses: supercharge/redis-github-action@1.1.0 | |
with: | |
redis-version: ${{ matrix.redis-version }} | |
- name: Run coverage report | |
run: |- | |
if [ "${{ matrix.node-version }}/${{ matrix.redis-version }}"x == "${DO_COVERALLS}"x ] | |
then | |
npm run coveralls | |
else | |
true | |
fi | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
DHL_API_KEY: ${{ secrets.DHL_API_KEY }} | |
DHL_ECOMMERCE_SOLUTIONS_CLIENT_ID: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_CLIENT_ID }} | |
DHL_ECOMMERCE_SOLUTIONS_CLIENT_SECRET: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_CLIENT_SECRET }} | |
DHL_ECOMMERCE_SOLUTIONS_ENVIRONMENT_URL: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_ENVIRONMENT_URL }} | |
FEDEX_ACCOUNT_NUMBER: ${{ secrets.FEDEX_ACCOUNT_NUMBER }} | |
FEDEX_ENVIRONMENT: ${{ secrets.FEDEX_ENVIRONMENT }} | |
FEDEX_KEY: ${{ secrets.FEDEX_KEY }} | |
FEDEX_METER_NUMBER: ${{ secrets.FEDEX_METER_NUMBER }} | |
FEDEX_PASSWORD: ${{ secrets.FEDEX_PASSWORD }} | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
PITNEY_BOWES_API_KEY: ${{ secrets.PITNEY_BOWES_API_KEY }} | |
PITNEY_BOWES_API_SECRET: ${{ secrets.PITNEY_BOWES_API_SECRET }} | |
UPS_ACCESS_KEY: ${{ secrets.UPS_ACCESS_KEY }} | |
UPS_PASSWORD: ${{ secrets.UPS_PASSWORD }} | |
UPS_USERNAME: ${{ secrets.UPS_USERNAME }} | |
USPS_USERID: ${{ secrets.USPS_USERID }} | |
- name: Run without coverage report | |
run: |- | |
if [ ! "${{ matrix.node-version }}/${{ matrix.redis-version }}"x == "${DO_COVERALLS}"x ] | |
then | |
npm test | |
else | |
true | |
fi | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
DHL_API_KEY: ${{ secrets.DHL_API_KEY }} | |
DHL_ECOMMERCE_SOLUTIONS_CLIENT_ID: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_CLIENT_ID }} | |
DHL_ECOMMERCE_SOLUTIONS_CLIENT_SECRET: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_CLIENT_SECRET }} | |
DHL_ECOMMERCE_SOLUTIONS_ENVIRONMENT_URL: ${{ secrets.DHL_ECOMMERCE_SOLUTIONS_ENVIRONMENT_URL }} | |
FEDEX_ACCOUNT_NUMBER: ${{ secrets.FEDEX_ACCOUNT_NUMBER }} | |
FEDEX_ENVIRONMENT: ${{ secrets.FEDEX_ENVIRONMENT }} | |
FEDEX_KEY: ${{ secrets.FEDEX_KEY }} | |
FEDEX_METER_NUMBER: ${{ secrets.FEDEX_METER_NUMBER }} | |
FEDEX_PASSWORD: ${{ secrets.FEDEX_PASSWORD }} | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
PITNEY_BOWES_API_KEY: ${{ secrets.PITNEY_BOWES_API_KEY }} | |
PITNEY_BOWES_API_SECRET: ${{ secrets.PITNEY_BOWES_API_SECRET }} | |
UPS_ACCESS_KEY: ${{ secrets.UPS_ACCESS_KEY }} | |
UPS_PASSWORD: ${{ secrets.UPS_PASSWORD }} | |
UPS_USERNAME: ${{ secrets.UPS_USERNAME }} | |
USPS_USERID: ${{ secrets.USPS_USERID }} | |
notify_slack: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Notify Slack | |
uses: homoluctus/slatify@master | |
with: | |
type: ${{ needs.test.result }} | |
job_name: '${{ github.repository }} - Tests ' | |
channel: '#bloodhound' | |
url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
commit: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
icon_emoji: ':mediocrebot:' | |
username: 'mediocrebot' |