Skip to content

Commit

Permalink
Merge pull request #1 from magick93/pr_test_1
Browse files Browse the repository at this point in the history
merge test 1
  • Loading branch information
magick93 authored Nov 25, 2024
2 parents 4956972 + 855d735 commit e5f98f6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 157 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: mdbook
# name: mdbook

on:
push:
branches:
- unstable
# on:
# push:
# branches:
# - unstable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
build-and-upload-to-s3:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
# jobs:
# build-and-upload-to-s3:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'

- run: mdbook build
working-directory: book
# - run: mdbook build
# working-directory: book

- uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-southeast-2'
SOURCE_DIR: 'book/book'
# - uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
# with:
# args: --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: 'ap-southeast-2'
# SOURCE_DIR: 'book/book'
130 changes: 1 addition & 129 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,132 +59,4 @@ jobs:
steps:
- name: Check that the pull request is not targeting the stable branch
run: test ${{ github.base_ref }} != "stable"
release-tests-ubuntu:
name: release-tests-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
# Use self-hosted runners only on the sigp repo.
runs-on: ubuntu-latest #${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable Rust
if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
bins: cargo-nextest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests in release
run: make nextest-release
- name: Show cache stats
if: env.SELF_HOSTED_RUNNERS == 'true'
run: sccache --show-stats
debug-tests-ubuntu:
name: debug-tests-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
# Use self-hosted runners only on the sigp repo.
runs-on: ubuntu-latest #${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable Rust
if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
bins: cargo-nextest
- name: Run tests in debug
run: make nextest-debug
- name: Show cache stats
if: env.SELF_HOSTED_RUNNERS == 'true'
run: sccache --show-stats
check-code:
name: check-code
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable Rust
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
components: rustfmt,clippy
bins: cargo-audit
- name: Check formatting with cargo fmt
run: make cargo-fmt
- name: Lint code for quality and style with Clippy
run: make lint
- name: Certify Cargo.lock freshness
run: git diff --exit-code Cargo.lock
- name: Run cargo audit
run: make audit-CI
# Dependency conflicts are causing pain here. Once SLOG is removed from lighthouse this should
# be re-enabled
# - name: Run cargo vendor to make sure dependencies can be vendored for packaging, reproducibility and archival purpose
#run: CARGO_HOME=$(readlink -f $HOME) make vendor
- name: Markdown-linter
run: make mdlint
check-msrv:
name: check-msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust at Minimum Supported Rust Version (MSRV)
run: |
metadata=$(cargo metadata --no-deps --format-version 1)
msrv=$(echo $metadata | jq -r '.packages | map(select(.name == "anchor")) | .[0].rust_version')
rustup override set $msrv
- name: Run cargo check
run: cargo check --workspace
cargo-udeps:
name: cargo-udeps
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest version of nightly Rust
uses: moonrepo/setup-rust@v1
with:
channel: nightly
bins: cargo-udeps
cache: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Cargo config dir
run: mkdir -p .cargo
- name: Install custom Cargo config
run: cp -f .github/custom/config.toml .cargo/config.toml
- name: Run cargo udeps to identify unused crates in the dependency graph
run: make udeps
env:
# Allow warnings on Nightly
RUSTFLAGS: ""
spell-check:
name: spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Uses the canonical version so that the version is up to date:
# https://github.com/rojopolis/spellcheck-github-actions?tab=readme-ov-file#using-a-canonical-version
- uses: rojopolis/spellcheck-github-actions@v0
# cli-check:
# name: cli-check
# needs: [check-labels]
# if: needs.check-labels.outputs.skip_ci != 'true'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Get latest version of stable Rust
# uses: moonrepo/setup-rust@v1
# with:
# channel: stable
# cache-target: release
# - name: Run Makefile to trigger the bash script
# run: make cli

1 change: 1 addition & 0 deletions temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test2

0 comments on commit e5f98f6

Please sign in to comment.