-
Notifications
You must be signed in to change notification settings - Fork 8
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: switch to shared actions #357
Open
nathanosdev
wants to merge
3
commits into
main
Choose a base branch
from
nathan/switch-shared-pnpm-action
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+496
−631
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
name: Build and Test | ||
name: build_and_test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: 'true' | ||
RUSTC_WRAPPER: 'sccache' | ||
|
||
jobs: | ||
build_and_test_rust: | ||
name: Build and Test Rust | ||
name: build_and_test_rust:required | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
@@ -39,15 +37,19 @@ jobs: | |
run: cargo fmt --all -- --check | ||
|
||
build_and_test_js: | ||
name: Build and Test JavaScript | ||
name: build_and_test_js:required | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: Setup PNPM | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- uses: ./.github/actions/setup-dfx | ||
- name: Setup DFX | ||
uses: dfinity/setup-dfx@main | ||
with: | ||
dfx-version: 'auto' | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
@@ -57,7 +59,7 @@ jobs: | |
- name: Cargo metadata | ||
run: cargo metadata --format-version 1 | ||
|
||
- name: Install wasm-pack | ||
- name: Setup wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Generate canister declarations | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: commitizen | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check_commit_messages: | ||
name: check_commit_messages:required | ||
uses: dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@main | ||
with: | ||
starting_commit: 'ac8f90b7c45e13e240d6c01a43d191b99f1aec4a' | ||
|
||
check_pr_title: | ||
name: check_pr_title:required | ||
uses: dfinity/ci-tools/.github/workflows/check-pr-title.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Create Release PR | ||
name: create_release_pr | ||
|
||
on: workflow_dispatch | ||
|
||
|
@@ -8,34 +8,38 @@ env: | |
|
||
jobs: | ||
bump_version: | ||
name: Bump version | ||
name: bump_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: 'Setup Python' | ||
uses: dfinity/ci-tools/actions/setup-python@main | ||
|
||
- uses: ./.github/actions/setup-dfx | ||
- name: 'Setup Commitizen' | ||
uses: dfinity/ci-tools/actions/setup-commitizen@main | ||
|
||
- name: Install wasm-pack | ||
- name: Setup PNPM | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- name: Setup DFX | ||
uses: dfinity/setup-dfx@main | ||
|
||
- name: Setup wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Bump Version | ||
id: cz | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
commit: false | ||
push: false | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Bump version | ||
id: bump_version | ||
uses: dfinity/ci-tools/actions/bump-version@main | ||
|
||
- name: Print Version | ||
run: echo "Bumping to version ${{ steps.cz.outputs.version }}" | ||
run: echo "Bumping to version ${{ steps.bump_version.outputs.version }}" | ||
|
||
- name: DFX prepare Certified Counter | ||
working-directory: examples/certification/certified-counter | ||
|
@@ -49,23 +53,14 @@ jobs: | |
pnpm build | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
uses: dfinity/ci-tools/actions/create-pr@main | ||
with: | ||
title: 'Release ${{ steps.cz.outputs.version }}' | ||
body: | | ||
branch_name: 'release/${{ steps.bump_version.outputs.version }}' | ||
pull_request_title: 'Release ${{ steps.bump_version.outputs.version }}' | ||
pull_request_body: | | ||
After merging this PR, tag the merge commit with: | ||
```shell | ||
git tag ${{ steps.cz.outputs.version }} | ||
git push origin ${{ steps.cz.outputs.version }} | ||
git tag ${{ steps.bump_version.outputs.version }} | ||
git push origin ${{ steps.bump_version.outputs.version }} | ||
``` | ||
commit-message: 'chore: release ${{ steps.cz.outputs.version }}' | ||
branch: 'release/${{ steps.cz.outputs.version }}' | ||
add-paths: | | ||
.cz.yaml | ||
CHANGELOG.md | ||
Cargo.toml | ||
Cargo.lock | ||
packages/certificate-verification-js/package.json | ||
packages/ic-certification-testing-wasm/package.json | ||
packages/ic-response-verification-tests/package.json | ||
packages/ic-response-verification-wasm/package.json | ||
commit_message: 'chore: release ${{ steps.bump_version.outputs.version }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
name: e2e Tests | ||
name: e2e_tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: 'true' | ||
RUSTC_WRAPPER: 'sccache' | ||
|
||
jobs: | ||
e2e_tests: | ||
name: e2e Tests | ||
name: e2e_tests:required | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: Setup PNPM | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
@@ -31,7 +30,7 @@ jobs: | |
path: tmp/ | ||
key: ${{ runner.os }}-tmp | ||
|
||
- name: Install wasm-pack | ||
- name: Setup wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: e2e tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release | ||
name: release | ||
|
||
on: | ||
push: | ||
|
@@ -11,23 +11,28 @@ env: | |
|
||
jobs: | ||
release: | ||
name: Release | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: Setup PNPM | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- uses: ./.github/actions/setup-dfx | ||
- name: Setup DFX | ||
uses: dfinity/setup-dfx@main | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: dfinity/ci-tools/actions/setup-python@main | ||
|
||
- name: Setup Commitizen | ||
run: pip install commitizen==2.42.1 | ||
uses: dfinity/ci-tools/actions/setup-commitizen@main | ||
|
||
- name: Install wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,14 @@ | ||
name: Update changelog | ||
name: generate_changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_changelog: | ||
name: Update Changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Commitzen | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U Commitizen | ||
|
||
- name: Check Commit Messages | ||
run: cz check --rev-range c8ecbc19b8c4a482e55907d37554d66f2f2f9a8f..HEAD | ||
|
||
- name: Update Changelog | ||
run: cz changelog | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
title: 'Update changelog' | ||
commit-message: 'chore: update changelog' | ||
branch: 'chore/update-changelog' | ||
branch-suffix: 'short-commit-hash' | ||
add-paths: | | ||
CHANGELOG.md | ||
generate_changelog: | ||
uses: dfinity/ci-tools/.github/workflows/generate-changelog.yaml@main | ||
with: | ||
auto_merge: true | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should this file be renamed too? (for consistency)