Skip to content

Commit

Permalink
Adds github actions while we wait for what to do with circle
Browse files Browse the repository at this point in the history
  • Loading branch information
nitaliano committed Nov 20, 2024
1 parent 5f805e1 commit 425907f
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Setup
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
cache: pnpm

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

- name: set nx base and head ref
uses: nrwl/nx-set-shas@v4

- name: log nx base and head ref
run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
shell: bash

- name: pnpm install node modules
run: pnpm i --frozen-lockfile
shell: bash

- name: pnpm build
run: pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=build
shell: bash
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Main

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
branches:
- main

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

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Run Linters
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=lint
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Run Tests
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.6
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "super",
"private": true,
"packageManager": "[email protected]",
"nx": {},
"dependencies": {
"nx": "^20.1.2"
Expand Down

0 comments on commit 425907f

Please sign in to comment.