Skip to content

Commit a3bdcec

Browse files
authored
Added workflows (#4)
* Added workflows * Pin YARN lock * Pin YARN lock * Pin YARN lock * Pin YARN lock * Pin YARN lock * Pin YARN lock * Pin YARN lock * Update contents of the dist directory * Pin YARN lock * Added readme --------- Co-authored-by: goruha <[email protected]>
1 parent c4d46fe commit a3bdcec

25 files changed

+30127
-1432
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends: .github

.github/release-drafter.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/settings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
2+
_extends: .github

.github/workflows/branch.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Branch
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- release/**
7+
types: [opened, synchronize, reopened]
8+
push:
9+
branches:
10+
- main
11+
- release/v*
12+
paths-ignore:
13+
- '.github/**'
14+
- 'docs/**'
15+
- 'examples/**'
16+
- 'test/**'
17+
- 'README.md'
18+
19+
permissions:
20+
contents: write
21+
actions: write
22+
23+
jobs:
24+
github-action:
25+
uses: cloudposse-github-actions/.github/.github/workflows/ci.yml@main
26+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1-
name: 'test'
2-
1+
name: build-and-test
32
on:
3+
pull_request:
4+
branches:
5+
- main
6+
types: [opened, synchronize, reopened]
47
push:
5-
paths-ignore:
6-
- '**.md'
7-
workflow_dispatch:
8+
branches:
9+
- main
810

911
jobs:
10-
unit-tests:
12+
check-dist:
13+
name: "check-dist matches source"
14+
uses: cloudposse/github-actions-workflows/.github/workflows/ci-typescript-app-check-dist.yml@main
15+
with:
16+
node-version: 20.x
17+
18+
unit-test:
19+
name: "unit tests"
1120
runs-on: ubuntu-latest
21+
needs: check-dist
1222
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
23+
- uses: actions/checkout@v4
1524
with:
16-
node-version: '20'
17-
cache: 'npm'
18-
- run: npm ci
19-
- run: |
20-
npm test
25+
ref: ${{ github.event.pull_request.head.ref }}
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version-file: package.json
29+
cache: yarn
30+
- name: install dependencies
31+
run: yarn install --frozen-lockfile --prefer-offline
32+
- uses: cloudposse/github-action-setup-atmos@v2
33+
with:
34+
install-wrapper: false
35+
- name: run unit tests
36+
run: yarn test
37+
2138
test-if-closed-pr-is-found:
2239
runs-on: ubuntu-latest
2340
steps:
@@ -30,7 +47,6 @@ jobs:
3047
- name: Build Action
3148
run: |
3249
npm run build
33-
npm run package
3450
- name: Run Action
3551
uses: ./
3652
id: pr
@@ -39,8 +55,9 @@ jobs:
3955
sha: "44b060a85b83f5baf49f523d8a58444ccca52ead"
4056
- name: Assert PR properties
4157
run: |
42-
[[ ${{ steps.pr.outputs.pr_found }} == true ]] || (echo "outputs.pr_found != true"; exit 1)
58+
[[ ${{ steps.pr.outputs.found }} == true ]] || (echo "outputs.found != true"; exit 1)
4359
[[ ${{ steps.pr.outputs.number }} == 5 ]] || (echo "outputs.number != 5"; exit 1)
60+
4461
test-if-closed-pr-is-not-found-when-filtering-closed-prs:
4562
runs-on: ubuntu-latest
4663
steps:
@@ -53,7 +70,6 @@ jobs:
5370
- name: Build Action
5471
run: |
5572
npm run build
56-
npm run package
5773
- name: Run Action
5874
uses: ./
5975
id: pr
@@ -62,8 +78,8 @@ jobs:
6278
github-token: ${{ secrets.GITHUB_TOKEN }}
6379
sha: "44b060a85b83f5baf49f523d8a58444ccca52ead"
6480
- name: Exit 1, if PR was falsely found
65-
if: steps.pr.outputs.pr_found != 'false'
66-
run: echo "if 'outputs.pr_found' falsely triggered"; exit 1
81+
if: steps.pr.outputs.found != 'false'
82+
run: echo "if 'outputs.found' falsely triggered"; exit 1
6783
- name: Assert PR properties
6884
run: |
6985
[[ '${{ steps.pr.outputs.number }}' == '' ]] || (echo "PR falsely found"; exit 1)

.github/workflows/build.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/check-dist.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)