This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.64 KB
/
analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Analysis
on:
workflow_dispatch:
inputs:
command:
description: Command
required: true
date:
description: Date
required: true
options:
description: Options
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- uses: actions/cache@v3.0.1
id: cache-venv
with:
path: ./venv/
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Create Python venv and install dependencies
run: python3 -m venv ./venv && . ./venv/bin/activate && pip install -r requirements.txt
if: steps.cache-venv.outputs.cache-hit != 'true'
- name: Run analysis package
run: >
. ./venv/bin/activate && python3 -m analysis ${{ github.event.inputs.command }} ${{ github.event.inputs.date }} ${{ github.event.inputs.options }}
- name: Commit, push, and create pull request
uses: peter-evans/create-pull-request@v4.0.1
with:
branch: process-result
branch-suffix: timestamp
commit-message: 'Process results for ${{ github.event.inputs.date }}'
committer: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
author: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
base: main
title: Process results for ${{ github.event.inputs.date }}
reviewers: qitianshi, anweiteck
assignees: qitianshi, anweiteck