Merge pull request #19 from djmitche/issue3

use a v1 .taskcluster.yml
This commit is contained in:
Dustin J. Mitchell 2020-11-21 19:15:57 -05:00 committed by GitHub
commit 1e28289b8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 30 deletions

View file

@ -1,29 +1,46 @@
version: 0
version: 1
reporting: checks-v1
policy:
pullRequests: public
tasks:
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- pull_request.opened
- pull_request.reopened
- pull_request.synchronize
- push
payload:
maxRunTime: 3600
image: 'rust:latest'
command:
- /bin/bash
- '-c'
- >-
git clone {{event.head.repo.url}} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout {{event.head.sha}} &&
cargo test
metadata:
name: Test
description: 'Run tests'
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
allowPullRequests: collaborators
$if: 'tasks_for in ["github-push", "github-pull-request"]'
then:
$let:
run:
$if: 'tasks_for == "github-push"'
then: true
else: {$eval: 'event.action in ["opened", "reopened", "synchronize"]'}
repo_url:
$if: 'tasks_for == "github-push"'
then: ${event.repository.clone_url}
else: ${event.pull_request.head.repo.clone_url}
ref:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.pull_request.head.sha}
in:
- $if: run
then:
provisionerId: 'proj-misc'
workerType: 'ci'
deadline: {$fromNow: '1 hour'}
expires: {$fromNow: '1 day'}
payload:
maxRunTime: 3600
image: rust:latest
command:
- /bin/bash
- '-c'
- >-
rustup component add rustfmt &&
git clone ${repo_url} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout ${ref} &&
cargo test &&
cargo fmt -- --check
metadata:
name: taskchampion-tests
description: Run tests for taskchampion
owner: dustin@v.igoro.us
source: ${repo_url}

View file

@ -1,7 +1,7 @@
mod task;
mod taskbuilder;
pub use self::taskbuilder::TaskBuilder;
pub use self::task::{Task, Priority, Status, Timestamp, Annotation};
pub use self::task::Priority::*;
pub use self::task::Status::*;
pub use self::task::{Annotation, Priority, Status, Task, Timestamp};
pub use self::taskbuilder::TaskBuilder;