This repository has been archived by the owner on May 14, 2024. It is now read-only.
support getFeeForMessage #4
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
name: Solana-Elixir Library Build, Code Check and Test Pipeline | |
on: | |
pull_request: | |
branches: | |
- "*" | |
# NOTE: Required for GitHub workflow to get JWT to authenticate with AWS | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-analyze-test: | |
name: Build, code check and test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
# Checkout the Code ----------------------------------------------------- | |
- uses: actions/checkout@v4 | |
# Setup Needed tools ---------------------------------------------------- | |
- name: Setup elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
version-file: .tool-versions | |
version-type: strict | |
# Restores cache ---------------------------------------------------- | |
- name: Cache PLT files | |
id: cache-plt | |
uses: actions/cache@v4 | |
with: | |
path: | | |
deps | |
_build | |
key: cache-v1-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
cache-v1- | |
# Get and build all the deps -------------------------------------------- | |
- name: Install Dependencies | |
run: | | |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "[email protected]:" | |
MIX_ENV=test mix deps.get | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
# Build the project ----------------------------------------------------- | |
- name: Build the Project | |
run: MIX_ENV=test mix compile | |
# Check code format ----------------------------------------------------- | |
- name: Run formatter check | |
run: | | |
mix format --check-formatted | |
# Basic security audit -------------------------------------------------- | |
- name: Run security check | |
run: | | |
mix sobelow --config | |
# Install Solana CLI -------------------------------------------------- | |
- name: Install Solana CLI | |
run: | | |
sh -c "$(curl -sSfL https://release.solana.com/v1.18.12/install)" | |
# Set Solana to Path -------------------------------------------------- | |
- name: Set Solana to Path | |
run: | | |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | |
# Run the unit tests ---------------------------------------------------- | |
- name: Run unit tests | |
run: | | |
mix test --cover --export-coverage default | |
# Run a static code analysis -------------------------------------------- | |
- name: Run Dialyzer | |
run: > | |
mix dialyzer --format dialyxir | |