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

CI setup #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
62 changes: 62 additions & 0 deletions .github/workflows/feature-branch-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Feature branch
on:
push:
branches-ignore:
master

jobs:
infrastructure:
name: Diff infrastructure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Show infrastructure
id: showinfrastructure
run: |
cd infrastructure/aws

npm install

npm run build

# todo: npm run cdk diff
infra=$(npm run cdk synth)

infra="${infra//'%'/'%25'}"
infra="${infra//$'\n'/'%0A'}"
infra="${infra//$'\r'/'%0D'}"
echo "::set-output name=infra::$infra"
- uses: jwalton/[email protected]
id: finder
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: marocchino/[email protected]
name: Add comment to PR
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: Infrastructure
number: ${{ steps.finder.outputs.pr }}
message: |
Infrastructure for commit `${{ github.sha }}`:
<details>
<summary>Click to see the log</summary>

```yml
${{ steps.showinfrastructure.outputs.infra }}
```
</details>
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
run: |
node common/scripts/install-run-rush.js install

# todo: iterate over services dir
cd services/_test

npm run build

npm run test
Loading