Skip to content

Commit

Permalink
chore: add git actions (#111)
Browse files Browse the repository at this point in the history
* add go tests

* add js tests

* fix how license is shown

* add rust flow

* fix syntax

* cd into rust

* test

* test++

* test++

* test++

* migrate

* add rust linting

* fix concurrency

* formatting

* lint pr

* rename main to master

* fix test

* fix clippy issues

Co-authored-by: Marko Baricevic <[email protected]>
  • Loading branch information
tac0turtle and tac0turtle authored Nov 10, 2022
1 parent 4a951ea commit 82313ed
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 158 deletions.
139 changes: 0 additions & 139 deletions .circleci/config.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read

jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint
on:
pull_request:
push:
branches:
- master

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}-linting
cancel-in-progress: true

jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check formatting of workspace
working-directory: ./rust
run: cargo fmt -- --check

- name: Clippy linting on workspace (host-functions + std)
working-directory: ./rust
run: cargo clippy --tests -- -D warnings

- name: Clippy linting on workspace (no-std)
working-directory: ./rust
run: cargo clippy --tests --no-default-features -- -D warnings

- name: Clippy linting on workspace (host functions only)
working-directory: ./rust
run: cargo clippy --tests --no-default-features --features host-functions -- -D warnings

69 changes: 69 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Tests
on:
pull_request:
push:
branches:
- master

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true

jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.2
- name: test
working-directory: ./go
run: make test

ts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
working-directory: ./js
run: yarn && yarn test

rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check all target in std
working-directory: ./rust
run: cargo check --all

- name: Check all target in no_std
working-directory: ./rust
run: cargo check --no-default-features --all

- name: Build all targets in std
working-directory: ./rust
run: cargo build --all --all-targets

- name: Build all targets in no_std
working-directory: ./rust
run: cargo build --all --no-default-features

- name: Run all tests with no-std
working-directory: ./rust
run: cargo test --all --no-default-features

- name: Run all tests with std
working-directory: ./rust
run: cargo test --all

- name: check no_std compatibility
run: cd rust/no-std-check/; make setup; make all


3 changes: 0 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Confio/ICS23
License: Apache2.0

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
Loading

0 comments on commit 82313ed

Please sign in to comment.