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

Bump EnricoMi/publish-unit-test-result-action from 1 to 2 #3

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
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
52 changes: 52 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module.exports = {
root: true,
ignorePatterns: ["dist/", "*.js"],
parser: "@typescript-eslint/parser",
plugins: ["simple-import-sort", "import", "unused-imports"],
parserOptions: {
tsconfigRootDir: __dirname,
project: "tsconfig.json",
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
],
env: {
node: true,
},
rules: {
eqeqeq: "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ accessibility: "no-public" },
],
"import/order": "off",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "warn",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
},
],
},
};
31 changes: 31 additions & 0 deletions .github/actions/install-anchor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Setup Anchor cli

inputs:
anchor_git:
description: Link to Anchor cli GH repository
required: true
anchor_version:
description: Version of Anchor cli
required: true

runs:
using: "composite"
steps:
- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-anchor
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }}
- name: Install anchor
if: steps.cache-anchor.outputs.cache-hit != 'true'
run: cargo install --git ${{inputs.anchor_git}} --tag v${{inputs.anchor_version}} anchor-cli --locked --force
shell: bash
- uses: actions/upload-artifact@v2
with:
name: anchor-binary
path: ~/.cargo/bin/anchor
30 changes: 30 additions & 0 deletions .github/actions/install-linux-build-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Install Linux Build Deps
runs:
using: "composite"
steps:
- name: apt-get add llvm-snapshot key and update
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
sudo apt-get update
shell: bash

- name: apt-get install clang
run: |
sudo apt-get install -y clang-7 --allow-unauthenticated
clang-7 --version
shell: bash

- name: apt-get install ssl libs
run: |
sudo apt-get install -y openssl --allow-unauthenticated
sudo apt-get install -y libssl-dev --allow-unauthenticated
sudo apt-get install -y libssl1.1 --allow-unauthenticated
shell: bash

- name: apt-get install dev tools
run: |
sudo apt-get install -y libudev-dev
sudo apt-get install -y binutils-dev
sudo apt-get install -y libunwind-dev
shell: bash
37 changes: 37 additions & 0 deletions .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Install Rust

inputs:
toolchain:
description: The Rust version to use, default env.RUST_TOOLCHAIN
required: true

runs:
using: "composite"
steps:
- name: Install Rust Stable
id: rust_toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
override: true
profile: minimal
components: rustfmt, clippy

- name: Add Cargo bin to Path
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Verify Rust install
run: |
echo "Verifying rust '${{ inputs.toolchain }}' ..."
rustc --version
cargo --version
cargo clippy --version
rustfmt --version
shell: bash

- name: Share rustc hash
run: |
echo 'RUSTC_HASH=${{ steps.rust_toolchain.outputs.rustc_hash }}' >> $GITHUB_ENV
shell: bash
45 changes: 45 additions & 0 deletions .github/actions/install-solana/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Install Solana

inputs:
solana_version:
description: Version of Solana to install
required: true

runs:
using: "composite"
steps:
- name: Cache Solana Install
id: cache-solana-install
uses: actions/cache@v2
with:
path: "$HOME/.local/share/solana/install/releases/${{ inputs.solana_version }}"
key: ${{ runner.os }}-Solana-v${{ inputs.solana_version }}

- name: Install Solana
# if: steps.cache-solana-install.outputs.cache-hit != 'true'
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${{ inputs.solana_version }}/install)"
shell: bash

- name: Set Active Solana Version
run: |
rm -f "$HOME/.local/share/solana/install/active_release"
ln -s "$HOME/.local/share/solana/install/releases/${{ inputs.solana_version }}/solana-release" "$HOME/.local/share/solana/install/active_release"
shell: bash

- name: Add Solana bin to Path
run: |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
shell: bash

- name: Verify Solana install
run: |
solana --version
shell: bash

- name: Install toolchain
run: |
echo Installing bpf toolchain...
(cd /home/runner/.local/share/solana/install/active_release/bin/sdk/bpf/scripts; ./install.sh)
shell: bash
28 changes: 28 additions & 0 deletions .github/actions/install-soteria/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Install soteria

inputs:
soteria-version:
description: Version of Solana to install
required: true

runs:
using: "composite"
steps:
- name: Cache Soteria Install
id: cache-soteria-install
uses: actions/cache@v2
with:
path: "PATH=$PWD/soteria-linux-develop/bin/soteria"
key: ${{ runner.os }}-soteria-v${{ inputs.soteria-version }}
- name: Install soteria
if: steps.cache-soteria.outputs.cache-hit != 'true'
run: |
echo Installing Soteria...
sh -c "$(curl -k https://supercompiler.xyz/install)"
export PATH=$PWD/soteria-linux-develop/bin/:$PATH
echo "$PWD/soteria-linux-develop/bin" >> $GITHUB_PATH
shell: bash
# - uses: actions/upload-artifact@v2
# with:
# name: soteria-binary
# path: $PWD/soteria-linux-develop/bin/soteria
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
40 changes: 40 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish docs

on:
workflow_dispatch: {}
push:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

jobs:
site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-

- name: Install Yarn dependencies
run: yarn install
- run: yarn docs:generate
- run: cp -R images/ site/

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: site
61 changes: 61 additions & 0 deletions .github/workflows/publish-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish JS

on:
workflow_dispatch: {}
push:
tags:
- "js-v*.*.*"

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

jobs:
release-sdk:
runs-on: ubuntu-latest
name: Release SDK on NPM
steps:
- uses: actions/checkout@v3

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- uses: actions/setup-node@v3
env:
FORCE_COLOR: 0
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
cache-dependency-path: ./yarn.lock

- name: Install Yarn dependencies
run: yarn install
- run: yarn build
- run: |
echo 'npmAuthToken: "${NPM_AUTH_TOKEN}"' >> .yarnrc.yml
- name: Publish
run: yarn publish
site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Yarn dependencies
run: yarn install
- run: yarn docs:generate
- run: cp -R images/ site/

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: site
Loading