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

Adds github actions while we wait for what to do with circle #10

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading