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

chore/packages-for-action #19

Merged
merged 9 commits into from
Jan 16, 2025
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
15 changes: 8 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Deploy
name: Publish to NPM
on:
workflow_dispatch:
inputs:
job:
description: Job to run
description: Package to publish
required: true
type: choice
options:
- cli
- shared
default: cli
semver:
description: Bump version
Expand All @@ -30,7 +31,7 @@ jobs:
outputs:
version: ${{steps.version-out.outputs.version}}
env:
DIR: apps/cli
DIR: apps/${{github.event.inputs.job}}
steps:
- uses: actions/[email protected]
with:
Expand All @@ -41,9 +42,9 @@ jobs:
node-version: '20'

- name: Install deps
run: cd ${{env.DIR}} && npm install
run: npm install --workspaces
- name: Run test
run: cd ${{env.DIR}} && npm run test
run: cd apps/shared && npm run test
- name: Compile
run: cd ${{env.DIR}} && npm run build
- name: Bump version
Expand All @@ -66,10 +67,10 @@ jobs:
with:
author_name: Sokari
author_email: [email protected]
message: "Release CLI version ${{ steps.publish.outputs.version }}"
message: "Release ${{github.event.inputs.job}} version ${{ steps.publish.outputs.version }}"
add: '${{ env.DIR }}/*.json'
push: 'origin main --force'
tag: 'v${{steps.publish.outputs.version}} --force'
tag: 'v${{steps.publish.outputs.version}}-${{github.event.inputs.job}} --force'

deploy-docker:
if: ${{ github.event.inputs.job == 'cli' && github.event.inputs.build-docker == 'true' }}
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/example-site-build.yaml

This file was deleted.

52 changes: 9 additions & 43 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,28 @@ permissions:
jobs:
test-deploy:
runs-on: ubuntu-latest
env:
DIR: apps/cli
steps:
- uses: actions/[email protected]
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install deps
run: cd ${{env.DIR}} && npm i
run: npm i --workspaces

- name: Run test
run: cd ${{env.DIR}} && npm run test
- name: Test Shared package
run: cd apps/shared && npm run test

- name: Generate and deploy Allure Report
uses: cybersokari/[email protected]
env:
SLACK_TOKEN: ${{secrets.SLACK_TOKEN}}
GOOGLE_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: cybersokari/[email protected]
with:
allure_results_path: '${{env.DIR}}/allure-results'
allure_results_path: 'apps/shared/allure-results'
storage_bucket: ${{vars.STORAGE_BUCKET}}
slack_channel: ${{secrets.SLACK_CHANNEL_ID}}
slack_token: ${{secrets.SLACK_TOKEN}}
show_history: true
retries: 10
prefix: 'pr-test'
update_pr: 'comment'
test-output:
runs-on: ubuntu-latest
env:
DIR: apps/cli
steps:
- uses: actions/[email protected]
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install deps
run: cd ${{env.DIR}} && npm i

- name: Run test
run: cd ${{env.DIR}} && npm run test

- name: Generate and deploy Allure Report
uses: cybersokari/[email protected]
env:
GOOGLE_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
allure_results_path: '${{env.DIR}}/allure-results'
storage_bucket: ${{vars.STORAGE_BUCKET}}
show_history: true
retries: 10
prefix: 'pr-test'
update_pr: 'comment'
output: allure-report
pr_comment : 'true'
github_token: ${{secrets.PERSONAL_ACCESS_TOKEN}}
google_credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Allure Report Deployer

![Deploy](https://github.com/cybersokari/allure-docker-deploy/actions/workflows/deploy.yaml/badge.svg?branch=main)
![Deploy](https://github.com/cybersokari/allure-docker-deploy/workflows/Test/badge.svg)
![Test](https://github.com/cybersokari/allure-docker-deploy/workflows/Test/badge.svg)
![docker](https://img.shields.io/docker/pulls/sokari/allure-deployer)
![npm](https://img.shields.io/npm/dt/allure-deployer?label=npm%20downloads)

Expand Down
Loading
Loading