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

test: remove vendored actions #441

Merged
merged 6 commits into from
Nov 1, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
schedule:
- cron: '0 4 * * 0,3' # 4 a.m. UTC every Sun and Wed, keep actions-cache available
- cron: "0 4 * * 0,3" # 4 a.m. UTC every Sun and Wed, keep actions-cache available

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ concurrency:

jobs:
check:
name: conventional-pr-title:required
runs-on: ubuntu-latest
steps:
- uses: dfinity/[email protected]
with:
success-state: Title follows the specification.
failure-state: Title does not follow the specification.
context-name: conventional-pr-title
preset: conventional-changelog-angular@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Conventional commit patterns:
# verb: description
# verb!: description of breaking change
# verb(scope): Description of change to $scope
# verb(scope)!: Description of breaking change to $scope
# verb: feat, fix, ...
# scope: refers to the part of code being changed. E.g. " (accounts)" or " (accounts,canisters)"
# !: Indicates that the PR contains a breaking change.
- env:
TITLE: ${{ github.event.pull_request.title }}
run: |
echo "PR title: $TITLE"
if [[ "$TITLE" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
echo pass
else
echo "PR title does not match conventions"
exit 1
fi
15 changes: 6 additions & 9 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
schedule:
- cron: '0 4 * * 0,3' # 4 a.m. UTC every Sun and Wed, keep actions-cache available
- cron: "0 4 * * 0,3" # 4 a.m. UTC every Sun and Wed, keep actions-cache available

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -57,6 +57,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -90,14 +92,9 @@ jobs:
mv candid-extractor /usr/local/bin/candid-extractor

- name: Install DFX
uses: dfinity/setup-dfx@main
with:
dfx-version: "${{ env.dfx-version }}"

- name: Setup BATS
uses: mig4/[email protected]
uses: dfinity/setup-dfx@main
with:
bats-version: 1.2.1
dfx-version: "${{ env.dfx-version }}"

- name: Install bitcoin
if: ${{ matrix.project-name == 'management_canister' }}
Expand All @@ -117,7 +114,7 @@ jobs:
- name: Run Tests
shell: bash
run: |
bats -r examples/${{ matrix.project-name }}
./examples/bats/bats-core/bin/bats -r examples/${{ matrix.project-name }}
env:
RUST_BACKTRACE: 1

Expand Down
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "examples/bats/bats-core"]
path = examples/bats/bats-core
url = https://github.com/bats-core/bats-core.git
[submodule "examples/bats/bats-support"]
path = examples/bats/bats-support
url = https://github.com/bats-core/bats-support.git
[submodule "examples/bats/bats-assert"]
path = examples/bats/bats-assert
url = https://github.com/bats-core/bats-assert.git
1 change: 1 addition & 0 deletions examples/bats/bats-assert
Submodule bats-assert added at e2d855
1 change: 1 addition & 0 deletions examples/bats/bats-core
Submodule bats-core added at f1f511
1 change: 1 addition & 0 deletions examples/bats/bats-support
Submodule bats-support added at 9bf10e