Skip to content

Commit

Permalink
Merge pull request #906 from OneSignal/github-actions
Browse files Browse the repository at this point in the history
Github Actions
  • Loading branch information
rgomezp authored Aug 15, 2022
2 parents 8b8434e + 8a950bc commit 75bdc26
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 31 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build SDK Files & S3 Upload

on:
workflow_dispatch:

jobs:
test_build_deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: "[Setup] Install dependencies"
run: yarn
- name: "[Test] Run all tests"
run: yarn test:CI
- name: "[Build] Staging"
env:
STAGING_DOMAIN: ${{ secrets.STAGING_DOMAIN }}
run: BUILD_ORIGIN=${STAGING_DOMAIN} API=staging API_ORIGIN=${STAGING_DOMAIN} yarn build:staging
- name: "[Build] Production"
run: yarn build:prod
- name: "[Deploy] Upload SDK Files to S3"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: ./build/scripts/s3-simple-upload-all.sh build/releases s3://onesignal-build/websdk/${{ github.sha }}
- name: "[Deploy] Upload AMP SDK Files to S3"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: ./build/scripts/s3-simple-upload-all.sh build/amp s3://onesignal-build/websdk/${{ github.sha }}
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run Tests
on:
pull_request:
branches:
- "**"

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: "[Setup] Install dependencies"
run: yarn
- name: "[Test] Run all tests"
run: yarn test:CI
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build Status](https://travis-ci.org/OneSignal/OneSignal-Website-SDK.svg?branch=master)](https://travis-ci.org/OneSignal/OneSignal-Website-SDK)

<p align="center">
<img src="https://media.onesignal.com/cms/Website%20Layout/logo-red.svg"/>
<br/>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Tests are built to run with the [AVA test runner](https://github.com/avajs/ava)
### Option 1 - Run locally
> Recommend for macOS or if you haven't used or setup docker before.
1. Install the specific version of Node.js defined in `.travis.yml` in this repo.
1. Install the specific version of Node.js defined in the Github Actions `ci.yml` in this repo.

### Option 2 - Run with Docker
> NOT Recommend for macOS due to performance issues, about 10x slower.
Expand Down

0 comments on commit 75bdc26

Please sign in to comment.