Skip to content

Commit

Permalink
Merge pull request #102 from silinternational/develop
Browse files Browse the repository at this point in the history
Use GitHub Actions
  • Loading branch information
briskt authored Mar 27, 2024
2 parents 5c0b24e + c0630a5 commit 14ceae9
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 38 deletions.
5 changes: 0 additions & 5 deletions .dockerignore

This file was deleted.

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: Test

on:
push:
branches:
- "**"
tags-ignore:
- "*"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21', '1.22' ]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- run: go test -v ./...
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Serverless directories
.serverless
package-lock.json

# golang output binary directory
bin

# local creds and stuff
.env
aws.env
*.env
*.aes
config*.json

# dev tools metadata
.idea/
node_modules/
.vscode

lambda-example/go.mod
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions codeship-services.yml

This file was deleted.

3 changes: 0 additions & 3 deletions codeship-steps.yml

This file was deleted.

1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ replace github.com/silinternational/personnel-sync/v6 => ./

require (
github.com/Jeffail/gabs/v2 v2.7.0
github.com/aws/aws-lambda-go v1.46.0
github.com/aws/aws-sdk-go v1.49.17
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.20.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Jeffail/gabs/v2 v2.7.0 h1:Y2edYaTcE8ZpRsR2AtmPu5xQdFDIthFG0jYhu5PY8kg=
github.com/Jeffail/gabs/v2 v2.7.0/go.mod h1:dp5ocw1FvBBQYssgHsG7I1WYsiLRtkUaB1FEtSwvNUw=
github.com/aws/aws-lambda-go v1.46.0 h1:UWVnvh2h2gecOlFhHQfIPQcD8pL/f7pVCutmFl+oXU8=
github.com/aws/aws-lambda-go v1.46.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A=
github.com/aws/aws-sdk-go v1.49.17 h1:Cc+7LgPjKeJkF2SdNo1IkpQ5Dfl9HCZEVw9OP3CPuEI=
github.com/aws/aws-sdk-go v1.49.17/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
Expand Down
7 changes: 1 addition & 6 deletions lambda-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public repository.
## Setup

The contents of this `lambda-example` directory are intended to downloaded/copied to your own filesystem and
repository. In this directory are a couple files for use with [Codeship](https://codeship.com). If you don't use
Codeship you can remove them and replace them with whatever is appropriate for your CI/CD provider.
repository.

After downloading the files, copy `config.example.json` to `config.json` and edit as needed. Also copy `.env.example`
to `.env` and insert AWS credentials for Serverless to use to deploy the Lambda function.
Expand All @@ -23,7 +22,3 @@ the easiest way to do all this is using the included `Dockerfile` and `docker-co
Run `make deploy`. This will build the Docker image, run `go get` inside the container, build the Go binary, and
use Serverless to deploy the Lambda function to the default Serverless stage `dev`, but you can update the command in
the Makefile to change the stage as desired.

If you want to automate deployment with Codeship, encrypt the `.env` file to `.env.encrypted` and connect your private
project repo with Codeship. By default it is configured to only deploy _production_ when changes are pushed to the
main branch.
5 changes: 0 additions & 5 deletions lambda-example/codeship-services.yml

This file was deleted.

4 changes: 0 additions & 4 deletions lambda-example/codeship-steps.yml

This file was deleted.

0 comments on commit 14ceae9

Please sign in to comment.