Skip to content

Commit

Permalink
ci: run unittest when push
Browse files Browse the repository at this point in the history
  • Loading branch information
XuNeal committed Aug 29, 2024
1 parent ffb7824 commit 2a885fc
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/run-unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build Android Release

on:
pull_request:
types:
- opened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always


jobs:
build:
name: Run Tcx Unit Testing
runs-on: macos-12
steps:
- name: Get the latest commit SHA
id: sha
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const { owner, repo, number } = context.issue
const pr = await github.rest.pulls.get({
owner,
repo,
pull_number: number,
})
return pr.data.head.sha
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ steps.sha.outputs.result }}
fetch-depth: 5

- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.rustup
target
key: ${{ runner.os }}-nightly

- name: Install Rust
run: |
rustup toolchain install nightly-2022-10-31
rustup default nightly-2022-10-31-x86_64-apple-darwin
rustup show
- name: Install dependency
run: |
brew install protobuf
- name: Run TCX Unit Testing
run: |
make test-tcx:

0 comments on commit 2a885fc

Please sign in to comment.