Skip to content

Commit

Permalink
test: split workflow into two strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Firgrep committed Aug 17, 2024
1 parent 367701c commit dda0b1a
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr_quality_control.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Pull Request Quality Control

on:
workflow_dispatch:
pull_request:
branches: [main]
# pull_request:
# branches: [main]

jobs:
formatting:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/verify_formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Verify formatting

on:
workflow_dispatch:
pull_request:
branches: [main]

jobs:
formatting:
permissions:
contents: "write"
pull-requests: "write"

runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Get Prettier version from package-lock.json
run: |
PRETTIER_VERSION=$(grep -m 1 'prettier' package-lock.json | cut -d '"' -f 4 | cut -c 2-)
echo $PRETTIER_VERSION
- name: Run Prettier (specific version)
run: |
npx --yes prettier@$PRETTIER_VERSION --config .prettierrc --write .
- name: Check for changes
id: check-changes
run: |
git config --global user.name "sPhil_PR_quality_ctl"
git config --global user.email "[email protected]"
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "ci: format code with Prettier [on behalf of ${{ github.event.pull_request.user.login }}]"
git push origin HEAD:${{ github.event.pull_request.head.ref }}
fi
53 changes: 53 additions & 0 deletions .github/workflows/verify_mdx_content.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Verify MDX Content

on:
workflow_dispatch:
workflow_run:
workflows: ["Verify formatting"]
types:
- completed


jobs:
verification:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/cache/restore@v4
id: prepyrus-cache-restore
with:
path: target/release/prepyrus
key: ${{ runner.os }}-cargo-${{ hashFiles('scripts/prepyrus/Cargo.lock') }}-${{ hashFiles('scripts/prepyrus/src/**') }}

- name: Install Rust
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true'
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install dependencies
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true'
run: cargo build --release --package prepyrus

- name: Run prepyrus script in verification mode
run: target/release/prepyrus absolute_bibliography.bib src/pages verify

- name: Save Prepyrus to cache
id: prepyrus-cache-save
if: steps.prepyrus-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: target/release/prepyrus
key: ${{ runner.os }}-cargo-${{ hashFiles('scripts/prepyrus/Cargo.lock') }}-${{ hashFiles('scripts/prepyrus/src/**') }}



# To include multiple paths for the cache:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
3 changes: 1 addition & 2 deletions src/pages/hegel/guides/science-of-logic-introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,7 @@ consciousness in that thinking is able to consider an issue without being bound
to a limited subject-object dichotomy. What Hegel describes here is simply the
free movement of the knowing mind—an exercise human beings have engaged in
since before history. However, it would be inadequate to regard pure science
merely as any activity that resembles knowing. Hegel adds additional qualifiers
that makes this conception something that is permanently explicit. Science,
merely as any activity that resembles knowing. Hegel adds additional qualifiers that makes this conception something that is permanently explicit. Science,
strictly speaking then, cannot be merely implicit, but must have itself as its
own object and that object be itself. This is what minimally constitutes pure
science. Furthermore, Hegel goes on to add that pure science or pure logic is
Expand Down

0 comments on commit dda0b1a

Please sign in to comment.