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

Add basic ci workflow #3

Merged
merged 7 commits into from
Nov 13, 2023
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
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Basic workflow

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: yarn install

- name: Type checking and generate .d.ts files before packaging
run: yarn tsc

- name: Build all
run: yarn build:all

- name: Build image
run: yarn workspace backend build-image

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test

format:
name: Formatting and linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: fetch branch main
run: git fetch origin main

- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: yarn install

- name: Prettier
run: yarn prettier:check

- name: Linting
run: yarn lint
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ At Axis, we've developed our own set of plugins exclusively available to us. Now
If you want to contribute to our plugins, read the Contribution guidelines here: - [Contributing to Axis Backstage plugins](https://github.com/AxisCommunications/backstage-plugins/blob/main/CONTRIBUTING.md).

## Contact

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:all": "backstage-cli repo test --coverage",
"test:e2e": "playwright test",
"fix": "backstage-cli repo fix",
"lint": "backstage-cli repo lint --since origin/master",
"lint": "backstage-cli repo lint --since origin/main",
"lint:all": "backstage-cli repo lint",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write .",
Expand Down