Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added workflows #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

24 changes: 0 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extends: .github
102 changes: 0 additions & 102 deletions .github/release-drafter.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
_extends: .github
26 changes: 26 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Branch
on:
pull_request:
branches:
- main
- release/**
types: [opened, synchronize, reopened]
push:
branches:
- main
- release/v*
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'
- 'README.md'

permissions:
contents: write
actions: write

jobs:
github-action:
uses: cloudposse-github-actions/.github/.github/workflows/ci.yml@main
secrets: inherit
95 changes: 95 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: build-and-test
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
push:
branches:
- main

jobs:
check-dist:
name: "check-dist matches source"
uses: cloudposse/github-actions-workflows/.github/workflows/ci-typescript-app-check-dist.yml@main
with:
node-version: 20.x

unit-test:
name: "unit tests"
runs-on: ubuntu-latest
needs: check-dist
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- name: install dependencies
run: yarn install --frozen-lockfile --prefer-offline
- uses: cloudposse/github-action-setup-atmos@v2
with:
install-wrapper: false
- name: run unit tests
run: yarn test

integration-test-single:
name: "integration test: single setting"
runs-on: ubuntu-latest
needs: check-dist
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- uses: cloudposse/github-action-setup-atmos@v2
with:
install-wrapper: false
- uses: ./
id: get-setting
with:
component: foo
stack: core-ue1-dev
settings-path: atmos_cli_config.components.terraform.base_path
- uses: nick-fields/assert-action@v2
with:
expected: "components/terraform"
actual: ${{ steps.get-setting.outputs.value}}

integration-test-multiple:
name: "integration test: multiple settings"
runs-on: ubuntu-latest
needs: check-dist
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- uses: cloudposse/github-action-setup-atmos@v2
with:
install-wrapper: false
- uses: ./
id: get-setting
with:
settings: |
- component: foo
stack: core-ue1-dev
settingsPath: atmos_cli_config.components.terraform.base_path
outputPath: prop1
- component: foo
stack: core-ue1-dev
settingsPath: settings.level1.level2.level3.secrets-arn
outputPath: prop2

- uses: nick-fields/assert-action@v2
with:
expected: '{"prop1":"components/terraform","prop2":"arn:aws:secretsmanager:us-east-1:000000000000:secret:MySecret-PlMes3"}'
actual: ${{ steps.get-setting.outputs.settings}}
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ jobs:
- run: npm ci
- run: |
npm run build

clean-run: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

lint:
runs-on: ubuntu-latest
steps:
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/check-dist.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/rebuild-dist.yml

This file was deleted.

Loading
Loading