Replace yaml with yml (#3)

* replace yaml with yml

* rm unneeded line
This commit is contained in:
Takayuki Maeda 2021-05-26 01:57:36 +09:00 committed by GitHub
parent ea774e4053
commit 5008d092e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View file

@ -63,7 +63,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry
if: runner.os != 'macOS'
uses: actions/cache@v1
with:
path: ~/.cargo/registry
@ -74,10 +73,14 @@ jobs:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
if: runner.os != 'macOS'
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Cache results
uses: actions/cache@v1
with:
path: results
key: ${{ runner.os }}-results-${{ hashFiles('**/results.yml') }}
- name: Run Tests
run: cargo run

View file

@ -2,8 +2,8 @@
## `ls`
* [ogham/exa](https://github.com/ogham/exa) A replacement for 'ls'
* [Peltoche/lsd](https://github.com/Peltoche/lsd) An ls with a lot of pretty colors and awesome icons
* [ogham/exa](https://github.com/ogham/exa) - A replacement for 'ls'
* [Peltoche/lsd](https://github.com/Peltoche/lsd) - An ls with a lot of pretty colors and awesome icons
## `cat`

1
results/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
results.yml

View file

@ -248,7 +248,7 @@ async fn main() -> Result<(), Error> {
let parser = Parser::new(&markdown_input);
let mut used: BTreeSet<String> = BTreeSet::new();
let mut results: Results = fs::read_to_string("results/results.yaml")
let mut results: Results = fs::read_to_string("results/results.yml")
.map_err(|e| format_err!("{}", e))
.and_then(|x| serde_yaml::from_str(&x).map_err(|e| format_err!("{}", e)))
.unwrap_or(Results::new());
@ -297,7 +297,7 @@ async fn main() -> Result<(), Error> {
for link in old_links {
results.remove(link).unwrap();
}
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
let mut not_written = 0;
let mut last_written = Local::now();
@ -345,12 +345,12 @@ async fn main() -> Result<(), Error> {
not_written += 1;
let duration = Local::now() - last_written;
if duration > Duration::seconds(5) || not_written > 20 {
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
not_written = 0;
last_written = Local::now();
}
}
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
println!("");
let mut failed: u32 = 0;